Ticket #748 (closed defect: fixed)
shp2pgsql use wrong schema name
| Reported by: | aperi2007 | Owned by: | pramsey |
|---|---|---|---|
| Priority: | medium | Milestone: | PostGIS 2.0.0 |
| Component: | loader/dumper | Version: | trunk |
| Keywords: | Cc: |
Description
Hi,
try-ing to load a shapefile on postgis 2.0.0 trunk using shp2pgsql.exe I notice that it produce a wrong sql file if the destination table has a schema. Infact if I call using: shp2pgsql.exe" -s 3003 -d -g geom -D -i -I -W "UTF-8" comuni.shp public.comuni > comuni.sql
asking to put the data in a table of a public schema I see the sql file a wrong schema name having a dot not necessary: 'public.' I add a portion of the sql generate to see the wrong schema name used.
This error is available even in the debian compiled from source.
SET CLIENT_ENCODING TO UTF8; SET STANDARD_CONFORMING_STRINGS TO ON; SELECT DropGeometryColumn?('public.','comuni','geom'); DROP TABLE "public."."comuni"; BEGIN; CREATE TABLE "public."."comuni" (gid serial PRIMARY KEY, "area" float8, "perimeter" float8, "am_com_" float8, "am_com_id" float8, "codcom" varchar(6), "nome" varchar(100), "codprov" varchar(3)); SELECT AddGeometryColumn?('public.','comuni','geom','3003','MULTIPOLYGON',2); COPY "public."."comuni" ("area","perimeter","am_com_","am_com_id","codcom","nome","codprov",geom) FROM stdin;
