[postgis-devel] [PostGIS] #748: shp2pgsql use wrong schema name
PostGIS
trac at osgeo.org
Fri Dec 31 14:07:25 PST 2010
#748: shp2pgsql use wrong schema name
-----------------------+----------------------------------------------------
Reporter: aperi2007 | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.0.0
Component: postgis | Version: trunk
Keywords: |
-----------------------+----------------------------------------------------
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;
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/748>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list