1

According to pgAdmin 4 4.21 documentation » Creating or Modifying a Table »

Select gin to create a GIN index. A GIN index may improve performance when managing two-dimensional geometric data types and nearest-neighbor searches

We should create a Gin index for geometric column if we intend to use Nearest-neighbor searches, Which I do!

However, when defining Gin index it asks for Operator Class and there are two options there (jsonb_path_obs and gin_int_ops) but none of them works with Geometry type.

Could someone please tell me how to create a Gin index on a Geometry type column?

P.S by geometry I mean PostGIS's geometry column type

1 Answer 1

5

Please link to the thing you are quoting so we don't have to go searching for it.

That looks like a bug in the pgadmin4 docs. They seem to have the GIN and GiST labels reversed in those descriptions. GIN supports multiple keys better than GiST does, but doesn't support nearest-neighbor or spatial. You want a GiST index.

Sign up to request clarification or add additional context in comments.

4 Comments

Sorry but the documentation was on 127.0.0.1 so I couldn't provide link. Yes, I should have searched and provide a link on the internet. I will edit my question and add your link to it.
Thanks by the way.(also +1)
OK, I see. I've fled a doc bug for this, redmine.postgresql.org/issues/5734.
That would be great as new users like me could really be misled

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.