From: Bborie Park Date: Wed, 25 Jul 2012 15:03:48 +0000 (+0000) Subject: Fixed syntax for setting tablespace for index. Ticket is #1932. Thanks X-Git-Tag: 2.1.0beta2~744 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=865da746c20f97b739fbcaf31e23bf96def03175;p=postgis Fixed syntax for setting tablespace for index. Ticket is #1932. Thanks kib. git-svn-id: http://svn.osgeo.org/postgis/trunk@10123 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/raster/loader/raster2pgsql.c b/raster/loader/raster2pgsql.c index 94a898c06..b88bd5b94 100644 --- a/raster/loader/raster2pgsql.c +++ b/raster/loader/raster2pgsql.c @@ -896,15 +896,15 @@ create_table( rterror(_("create_table: Could not allocate memory for CREATE TABLE statement")); return 0; } - sprintf(sql, "CREATE TABLE %s%s (\"rid\" serial PRIMARY KEY,%s raster%s)%s%s%s%s;", + sprintf(sql, "CREATE TABLE %s%s (\"rid\" serial PRIMARY KEY%s%s,%s raster%s)%s%s;", (schema != NULL ? schema : ""), table, + (idx_tablespace != NULL ? " USING INDEX TABLESPACE " : ""), + (idx_tablespace != NULL ? idx_tablespace : ""), column, (file_column ? ",\"filename\" text" : ""), (tablespace != NULL ? " TABLESPACE " : ""), - (tablespace != NULL ? tablespace : ""), - (idx_tablespace != NULL ? " USING INDEX TABLESPACE " : ""), - (idx_tablespace != NULL ? idx_tablespace : "") + (tablespace != NULL ? tablespace : "") ); append_sql_to_buffer(buffer, sql);