#2945 closed defect (fixed)
postgres driver failes to create geometry index if layer name starts with a number
Reported by: | winkey | Owned by: | chaitanya |
---|---|---|---|
Priority: | normal | Milestone: | 1.6.1 |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | postgres postgis PG |
Cc: | warmerdam |
Description
ERROR 1: 'CREATE INDEX 500hgt_geom_idx ON "public"."500hgt" USING GIST ("wkb_geometry")' failed for layer 500hgt, layer creation has failed.
index name needs to be quoted
in ogrpgdatasource.cpp around line 1291
osCommand.Printf("CREATE INDEX %s_geom_idx ON \"%s\".\"%s\" USING GIST (\"%s\")", pszTableName, pszSchemaName, pszTableName, pszGFldName);
should be
osCommand.Printf("CREATE INDEX \"%s_geom_idx\" ON \"%s\".\"%s\" USING GIST (\"%s\")", pszTableName, pszSchemaName, pszTableName, pszGFldName);
Change History (3)
comment:1 by , 15 years ago
Cc: | added |
---|---|
Component: | default → OGR_SF |
Keywords: | postgres postgis PG added |
Milestone: | → 1.6.1 |
Owner: | changed from | to
comment:2 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 15 years ago
Note:
See TracTickets
for help on using tickets.
Chaitanya,
Please setup a postgis database for testing (if you don't already have one), confirm the problem, confirm the fix and apply in trunk and 1.6.