Mark, thanks for quick response, I've try to do it with bash: [...@gis ~/gl/projects/osmrus]$ pgsql2shp -u pgsql -f dagestan.shp osm "SELECT st_intersection as geom from dagestan_point_attr WHERE highway='bus_stop'" Initializing... ERROR: Could not determine table metadata (empty table) [...@gis ~/gl/projects/osmrus]$ echo $? 1
But you wrote that > exit code of 0 on success, and 2 > if 0 records were processed > > Why I get 1, but not 2? On Mon, Sep 13, 2010 at 11:06 PM, Mark Cave-Ayland < mark.cave-ayl...@siriusit.co.uk> wrote: > Denis Rykov wrote: > > I've try to get exit code with my python script: >> >> import os >> code = os.system("pgsql2shp -f dagestan.shp -h gis-lab.info >> <http://gis-lab.info/> -u labinfo -P *** osm \"SELECT >> > ^^ > >> st_intersection as geom from dagestan_point_attr WHERE >> highway='bus_stop'") >> print code >> >> At result I've got 256 (not 2 as expected). >> > > Hmmmm looks like you're missing an escaped quote somewhere? If your "svn > up" worked, the exit code should be either 0 or 1. To test from bash: > > pgsql2shp -f dagestan.shp .... "SELECT st_intersection as geom from > dagestan_point_attr WHERE highway='bus_stop'" > echo $? > > > HTH, > > > Mark. > > -- > Mark Cave-Ayland - Senior Technical Architect > PostgreSQL - PostGIS > Sirius Corporation plc - control through freedom > http://www.siriusit.co.uk > t: +44 870 608 0063 > > Sirius Labs: http://www.siriusit.co.uk/labs > _______________________________________________ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users >
_______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users