[postgis] pgsql2shp

simon mercier simon.mercier at fadq.qc.ca
Tue Jan 15 10:58:35 PST 2002


Hi all

Maybe it's more a c question but...I try anyway. I add a -s option in
the pgsql2shp to allows specify sql to extract data from postgresql.  It
work fine with a simple sql like:

pgsql2shp -s 'select * from pclp_s WHERE nop=45893' -f  /tmp/pclp_s test
pclp_s

But if I need to use  the function GeometryFromText(), I need the <'>
character, the getopt() function in pgsql2shp.c return error...

pgsql2shp -s 'SELECT * FROM pclp_s WHERE the_geom &&
GeometryFromText('BOX3D(-71.593372 46.788388,-71.545372
46.836388)'::BOX3D,-1)' -f  /tmp/pclp_s test pclp_s
=
bash: syntax error near unexpected token `GeometryFromText('BOX3D(-'

I try a lot with no result. Is there a way to skip this character or any
suggestion to pass my sql string?

ps: I try postgres function chr(39) to skip <'>(i.e
...GeometryFromText((select chr(39))BOX3D... ) but dont work.

--
Simon Mercier
http://www.financiereagricole.qc.ca/




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Sponsored by VeriSign - The Value of Trust
Pinpoint the right security solution for your company - FREE
Guide from industry leader VeriSign gives you all the facts.
http://us.click.yahoo.com/pCuuSA/WdiDAA/yigFAA/PhFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
postgis-unsubscribe at yahoogroups.com

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 





More information about the postgis-users mailing list