[postgis-users] shp2pgsql and schemas
David Blasby
dblasby at refractions.net
Fri Dec 12 13:17:04 PST 2003
Seamus Thomas Carroll wrote:
> I have changed the code to:
> input := ''ALTER TABLE '' || quote_ident(schema_name) || ''.'' || quote_ident(table_name) || '' ADD COLUMN '' || quote_ident(column_name) || '' geometry '';
> RAISE NOTICE ''input: %'', input;
> EXECUTE input;
>
> and the output is now:
> psql:toload.txt:2: NOTICE: input: ALTER TABLE roads.carrolls_route_alberta_test ADD COLUMN the_geom geometry
> psql:toload.txt:2: ERROR: syntax error at or near "$3" at character 70
> CONTEXT: PL/pgSQL function "addgeometrycolumn" line 69 at return
>
> if I copy the result of the notice and paste it into the psql prompt it
> works without error.
>
> Could this be a error in posgtres that is causing a syntax error when one
> is not present?
Try putting a "RAISE NOTICE exec finished" immediately after the EXECUTE.
dave
More information about the postgis-users
mailing list