[postgis-tickets] [PostGIS] #3701: Escape double quotes issue in pgsql2shp
PostGIS
trac at osgeo.org
Thu Feb 2 08:30:48 PST 2017
#3701: Escape double quotes issue in pgsql2shp
----------------------+---------------------------
Reporter: kalxas | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.3.3
Component: postgis | Version: 2.2.x
Resolution: | Keywords:
----------------------+---------------------------
Changes (by robe):
* milestone: PostGIS PostgreSQL => PostGIS 2.3.3
Comment:
I don't think that DBFs support columns with quotes in them to being with.
Why is it you are wanting to do this? Seems strange to want to alias a
column to have quotes.
I did this for example and it worked using
RELEASE: 2.3.1dev (r15238)
{{{
pgsql2shp -r -g geom -f test pgr "SELECT
ST_SetSRID(ST_Point(1,2)::geometry,4326) AS "geom", 1 AS """quoteColumn""
}}}
However the output column gets output as QUOTECOLUMN
If you use the -k option to preserve case, the quotes still get stripped I
think
{{{
pgsql2shp -k -r -g geom -f test pgr "SELECT
ST_SetSRID(ST_Point(1,2)::geometry,4326) AS "geom", 1 AS """quoteColumn""
}}}
So my dbf column ends up being quoteColumn.
Anyrate, I think your quoting might still be off by a bit and seems like a
waste of effort.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3701#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-tickets
mailing list