Opened 13 years ago
Closed 13 years ago
#1091 closed defect (fixed)
shp2pgsql gui wrong use of create spatial index
Reported by: | aperi2007 | Owned by: | pramsey |
---|---|---|---|
Priority: | blocker | Milestone: | PostGIS 2.0.0 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
Hi, using the postgis 200 experimental version for windows (r7518). I try to use the shp2pgsql-gui to import a shapefile and set the create spatial index option. After I see this well knowed error:
Failed SQL begins: "CREATE INDEX "am_com_region_am_com_geom_gist" ON "public"."am_com_region_am_com" USING GIST ("geom" gist_geometry_ops); COMMIT; " Failed in pgui_exec(): ERROR: operator class "gist_geometry_ops" does not exist for access method "gist"
Regards,
Change History (8)
comment:1 by , 13 years ago
Priority: | medium → blocker |
---|
comment:2 by , 13 years ago
Priority: | blocker → medium |
---|
follow-up: 5 comment:3 by , 13 years ago
comment:4 by , 13 years ago
Priority: | medium → blocker |
---|
I see what you are saying now -- same issue as:
Another one of Paul's monsters not slain hiding in the closet.
comment:5 by , 13 years ago
NO, is a new database created just today using the postgis-200 r7518 experimental for windows.
It work unchecking the "create spatial index".
After, I see the same error in a my script where I have the same sintax
create index... using gist("geom" gist_geometry_ops)
but it was easy resolved removing the "gist_geometry_ops" string.
Replying to robe:
Andrea,
Are you using this on a new PostGIS 2.0 database or an older one or a 1.5 one?
Hmm perhaps our loader no longer works with PostGIS 1.5. That would be a big bummer.
comment:6 by , 13 years ago
I guess the command line will have the same issue? The problem seems to be at:
http://trac.osgeo.org/postgis/browser/trunk/loader/shp2pgsql-core.c#L1722
I'd change it myself, but I'm not sure what the right thing would be to do now that we support nd indexes. We might need another option or just always build 2D indexes by default. So I'll leave it to Paul to decide.
comment:7 by , 13 years ago
Still not fixed with postgis 2.0.0SVN (R7856, Last Changed Date: 2011-09-15 14:43:57). I am using postgresql 9.1. Removing the gist_geometry_ops from the create index line solves the problem.
comment:8 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I think the best answer for a quick fix is to remove the opclass specification entirely and let the default opclass rule. I've done this at r7862. In the Future, we might want to provide an option to build the n-d index, in which case we'll have to add another option in the GUI.
Andrea,
Are you using this on a new PostGIS 2.0 database or an older one or a 1.5 one?
Hmm perhaps our loader no longer works with PostGIS 1.5. That would be a big bummer.