[postgis-tickets] [PostGIS] #2986: [raster] raster2pgqsql

PostGIS trac at osgeo.org
Sat Nov 8 04:18:15 PST 2014


#2986: [raster] raster2pgqsql
-------------------------+--------------------------------------------------
 Reporter:  rmorelli     |       Owner:  dustymugs    
     Type:  enhancement  |      Status:  new          
 Priority:  medium       |   Milestone:  PostGIS 2.1.5
Component:  raster       |     Version:  2.1.x        
 Keywords:               |  
-------------------------+--------------------------------------------------

Comment(by robe):

 rmorelli -- I think there should be a way to escape text.  I don't like
 this workaround because there are other cases where people will want to do
 text filters.

 I know I mentioned the above.  Have you tried using:

 '' as an escape.  That's the new way of escaping in PostgreSQL and the \'
 was a legacy way which may be turned off in new PostgreSQL.

 So syntax would be:

 {{{
  DATA "PG:host=localhost port=5432 dbname='xxx' user='xxx' password='xxx'
 schema='raster' table='dem' where='filename=''dem20_12.tif''' mode='2'"
 }}}

 Also you above was missing an apostrophe so wouldn't have worked anyway --
 might have been my fault when I sent to postgis-users I might have left
 out the other slash


 So correct using slashes would be
 {{{
 DATA "PG:host=localhost port=5432 dbname='xxx' user='xxx' password='xxx'
 schema='raster' table='dem' where='filename=\'dem20_12.tif\'' mode='2'"
 }}}

 I don't like this proposes since it seems more a work around to something
 that is either an issue or just a misunderstanding with the GDAL driver.
 I'd much prefer updating the documentation to reflect how to use strings.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2986#comment:1>
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