From 865da746c20f97b739fbcaf31e23bf96def03175 Mon Sep 17 00:00:00 2001 From: Bborie Park Date: Wed, 25 Jul 2012 15:03:48 +0000 Subject: [PATCH] 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 --- raster/loader/raster2pgsql.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); -- 2.40.0