Opened 12 years ago

Closed 12 years ago

#1932 closed defect (fixed)

[raster] Index tablespace handing in raster2psql broken

Reported by: kib Owned by: Bborie Park
Priority: medium Milestone: PostGIS 2.0.2
Component: utils/loader-dumper Version: 2.0.x
Keywords: history Cc:


I tried using "-X" option for raster2psql but got a PostgreSQL syntax error.

raster2psql in version 2.0.1 outputs the following SQL:

CREATE TABLE "2mt_20120802_00" ("rid" serial PRIMARY KEY,"rast" raster)

while the correct PostgreSQL 9.1 syntax is:

CREATE TABLE "2mt_20120802_00" ("rid" serial PRIMARY KEY USING INDEX TABLESPACE "data","rast" raster)

where as it can be changed to use correct PostgreSQL syntax by changing code in raster/loader/raster2psql.c line 899 to:

sprintf(sql, "CREATE TABLE %s%s (\"rid\" serial PRIMARY KEY%s%s,%s raster%s)%s%s;",
(schema != NULL ? schema : ""),
(idx_tablespace != NULL ? " USING INDEX TABLESPACE " : ""),
(idx_tablespace != NULL ? idx_tablespace : ""),
(file_column ? ",\"filename\" text" : ""),
(tablespace != NULL ? " TABLESPACE " : ""),
(tablespace != NULL ? tablespace : "")

Change History (3)

comment:1 by pracine, 12 years ago

Summary: index tablespace handing in raster2psql broken[raster] Index tablespace handing in raster2psql broken

comment:2 by Bborie Park, 12 years ago

Owner: changed from mcayland to Bborie Park
Status: newassigned

comment:3 by Bborie Park, 12 years ago

Keywords: history added
Resolution: fixed
Status: assignedclosed

Fixed in r10121 for 2.0 and r10123 for trunk.

Note: See TracTickets for help on using tickets.