[postgis-users] help command pgsql2shp

strk at refractions.net strk at refractions.net
Wed Oct 26 01:36:24 PDT 2005


If you have access to backend logs enable statements logging
and see what exactly is pgsql2shp trying to use as attributes
query. Alternatively around line 53 of pgsql2shp.c set:
#define VERBOSE 3
That would explicitly print the query before sending it to backend.

--strk;

On Tue, Oct 25, 2005 at 06:30:23PM +0200, zourite at cegetel.net wrote:
> It would be great but that's not so easy
> this is my pgsql2shp version exe
> RCSID: $Id: pgsql2shp.c,v 1.74.2.4 2005/07/22 19:20:49 strk Exp $
> USAGE: pgsql2shp [<options>] <database> [<schema>.]<table>
>        pgsql2shp [<options>] <database> <query>
> 
> And this is the original command who doesn't work
> c:\PostgreSQL\8.0.3\bin>pgsql2shp -f c:\test.shp testgis 'select * from LT
> where gid = 82'
> Initializing... Querying for attributes: ERROR:  syntax error at or near
> "Select" at character 152
> 
> Even if i use -g the_geom option
> 
> Thanks
> 
> ***************************
> Vive la reunion ile intense
> Fé pété
> 
> > 	where name = 'XXX'
> >
> > you lack proper quoting
> >
> > --strk;
> >
> > On Tue, Oct 25, 2005 at 05:28:36PM +0200, zourite at cegetel.net wrote:
> >> Hello
> >> Is anyone can give me an example of pgsql2shp command with sql query in
> >> option. Is there a documentation of this function (may be i could write
> >> it).
> >> I'm looking for something like this :
> >> pgsql2shp -f c:\test.shp testgis 'select * from LT where name = XXX' but
> >> it doesn't work !
> >>
> >> Thanks
> >>
> >>
> >> _______________________________________________
> >> postgis-users mailing list
> >> postgis-users at postgis.refractions.net
> >> http://postgis.refractions.net/mailman/listinfo/postgis-users
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list