[postgis-devel] [PostGIS] #748: shp2pgsql use wrong schema name
PostGIS
trac at osgeo.org
Sat Jan 1 05:41:25 PST 2011
#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: |
-----------------------+----------------------------------------------------
Comment(by aperi2007):
It happened with more shapefiles. I try with three distinct shapefile.
The problem is in the use of schema.
If you try using
shp2pgsql.exe" -s 3003 -d -g geom -D -i -I -W "UTF-8" goofy.shp
table_destination > goofy.sql
You will have a regular and perfectly usable file sql.
But if you add the schema-name to the table_destination (public or other)
:
for example:
shp2pgsql.exe" -s 3003 -d -g geom -D -i -I -W "UTF-8" goofy.shp
public.table_destination > file.sql
You will have a not usable file sql.
Infact see-ing it you can see it have a double dot in every situation
where there is a citation of schema-name.
for examples.
...
DROP TABLE "public."."table_destination"
...
and so on.
Is as the shp2pgsql when detect the presence of a "schema name" in the
command line, it want add a dot to the schema name, causing the presence
of a double dot.
I verified this happened only with the postigis 2.0 version of shp2pgsql.
Actually to bypass this problem I must to omit the presence of schema-name
in the table_destination and so load all in a default schema.
Can you confirm this situation, thx ?
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/748#comment:2>
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