I am switching from mysql to postgres and I am having trouble creating an index.
CREATE INDEX pointsloc ON table USING gist (point_col);
This is the answer I am returning:
ERROR: the data type point does not have a default operator class for the access method "gist" TIP. You must specify an operator class for the index or define a default operator class for the data type.
I saw that I need to specify an operator class for the index, different classes can be used depending on the type of operators that you want to use in the column. I want to use @> or ~ to find if the point is inside the polygon.
How to specify an operator class? help, please, should be simple, but I'm at a standstill!
EDIT
The following is a print screen that is trying to add an index to the branch table:
Table "public.branch" Column | Type | Modifiers ------------------+------------------+----------------------------------------------------- id | integer | not null default nextval('branch_id_seq'::regclass) name | character(120) | center_point_lat | double precision | center_point_lng | double precision | center_point | point | Indexes: "branch_pkey" PRIMARY KEY, btree (id) paul=
source share