From: Sandro Santilli Date: Thu, 5 Aug 2004 16:53:29 +0000 (+0000) Subject: schema support patches sent by Mark X-Git-Tag: pgis_0_9_1~131 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e295384583af63e20aeeec3656b4192f25b2d4cd;p=postgis schema support patches sent by Mark git-svn-id: http://svn.osgeo.org/postgis/trunk@663 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/loader/pgsql2shp.c b/loader/pgsql2shp.c index 829345981..122e0ff42 100644 --- a/loader/pgsql2shp.c +++ b/loader/pgsql2shp.c @@ -10,6 +10,9 @@ * ********************************************************************** * $Log$ + * Revision 1.53 2004/08/05 16:53:29 strk + * schema support patches sent by Mark + * * Revision 1.52 2004/06/16 13:42:05 strk * Added schema support in getMaxFieldSize. * Added direct support for TIMESTAMP field types (thanks to Steffen Macke). @@ -2393,6 +2396,7 @@ initialize() sprintf(query, "SELECT a.attname, a.atttypid, a.attlen FROM " "pg_attribute a, pg_class c, pg_namespace n WHERE " "n.nspname = '%s' AND a.attrelid = c.oid AND " + "n.oid = c.relnamespace AND " "a.atttypid != 0 AND " "a.attnum > 0 AND c.relname = '%s'", schema, table); } diff --git a/loader/shp2pgsql.c b/loader/shp2pgsql.c index 564d4fd5c..42b1baca9 100644 --- a/loader/shp2pgsql.c +++ b/loader/shp2pgsql.c @@ -12,6 +12,9 @@ * ********************************************************************** * $Log$ + * Revision 1.61 2004/08/05 16:53:29 strk + * schema support patches sent by Mark + * * Revision 1.60 2004/07/29 14:10:37 strk * Unability to open a shapefile or dbffile reported more nicely. * @@ -921,8 +924,16 @@ int main (int ARGC, char **ARGV){ if (!dump_format) { - printf("INSERT INTO \"%s\" %s VALUES ('%d',", + if ( schema ) + { + printf("INSERT INTO \"%s\".\"%s\" %s VALUES ('%d',", + schema, table, col_names, j); + } + else + { + printf("INSERT INTO \"%s\" %s VALUES ('%d',", table, col_names, j); + } } else {