[postgis-devel] another patch for shp2pgsql
strk
strk at keybit.net
Thu Aug 5 13:00:36 PDT 2004
On Thu, Aug 05, 2004 at 03:52:13PM -0400, Carl Anderson wrote:
>
> one more schema sensitive instance
one more commit.
--strk;
>
> --
> Carl Anderson
> GIS Manager Fulton County, Georgia
> carl.anderson at co.fulton.ga.us
> 404.730.8026
>
> --- shp2pgsql.c.old Thu Aug 5 15:30:09 2004
> +++ shp2pgsql.c Thu Aug 5 15:32:45 2004
> @@ -1167,9 +1167,19 @@
>
> free(col_names);
> if(opt != 'a'){
> - printf("\nALTER TABLE ONLY \"%s\" ADD CONSTRAINT \"%s_pkey\" PRIMARY KEY (gid);\n",table,table);
> - if(j > 1){
> - printf("SELECT setval ('\"%s_gid_seq\"', %i, true);\n", table, j-1);
> + if ( schema )
> + {
> + printf("\nALTER TABLE ONLY \"%s\".\"%s\" ADD CONSTRAINT \"%s_pkey\" PRIMARY KEY (gid);\n",schema,table,table);
> + if(j > 1){
> + printf("SELECT setval ('\"%s\".\"%s_gid_seq\"', %i, true);\n", schema, table, j-1);
> + }
> + }
> + else
> + {
> + printf("\nALTER TABLE ONLY \"%s\" ADD CONSTRAINT \"%s_pkey\" PRIMARY KEY (gid);\n",table,table);
> + if(j > 1){
> + printf("SELECT setval ('\"%s_gid_seq\"', %i, true);\n", table, j-1);
> + }
> }
> }
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
More information about the postgis-devel
mailing list