Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6126571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:23:30+00:00 2026-05-23T16:23:30+00:00

I am going from mysql to postgres and I am having a problem creating

  • 0

I am going from mysql to postgres and I am having a problem creating an index.

CREATE INDEX pointsloc ON table USING gist (point_col);

This is the response I get back:

ERROR: data type point has no default operator class for access method “gist”
HINT: You must specify an operator class for the index or define a default operator class for the data type.

I have seen I need to specify the operator class for the index, different classes can be used depending upon the type of operators you wish to use on the column. I wish to use the @> or ~ to find if a point is within a polygon.

How do i specify the operator class?? help please has to be a simple thing but I am stumped!

EDIT

Below is a print screen of me 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=# create index pt_idx on branch using gist (center_point);
ERROR:  data type point has no default operator class for access method "gist"
HINT:  You must specify an operator class for the index or define a default operator class for the data type.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:23:31+00:00Added an answer on May 23, 2026 at 4:23 pm

    Seems to be working fine when I try:

    test=# create table test (pt point);
    CREATE TABLE
    test=# create index pt_idx on test using gist (pt);
    CREATE INDEX
    

    Are you sure your point_col actually is of type point? Because, if it’s a varchar, than it will indeed miserably fail without the btree_gist contrib – and even then it won’t be very useful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Converting a couple stored procedures from MySQL to Microsoft SQL server. Everything is going
I'm trying to display edges going from right to left (i.e. backwards) using dot:
I'm using the facedetect example and going from there. Right now it only detects
Wondering if I am going about this the right way. I am creating a
What's the best way to print from MySQL using PHP when you know there's
I am pulling messages from mysql using PHP to be displayed on a specific
I'm converting a db from postgres to mysql. Since i cannot find a tool
I'm building a quick csv from a mysql table with a query like: select
I'm reading data from a table( from a MySQL Database) with Hibernate SQL Query.
This is a weird problem and I'm not sure what's going on. I installed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.