[postgis-users] pgsql2shp - No GID variable

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Tue Oct 26 02:12:50 PDT 2010


Andreas Forø Tollefsen wrote:

> Hi all,
> 
> When using the pgsql2shp the gid column is not included.
> I even tried typing a "select gid AS g_id" to include it as a different 
> column name, but this did not work.
> 
> My syntax: pgsql2shp -f pgfinal2008.shp -h localhost -u user -P pass 
> postgis public.pgfinal2008 "SELECT *, gid as g_id FROM pgfinal2008
> 
> Any ideas how i manage to extract the gid column from my tables?

Hi Andreas,

Have you tried looking at the -r option for pgsql2shp?


ATB,

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



More information about the postgis-users mailing list