<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7600.16625"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>Denis,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>I don't have the latest svn version handy, though I think the 
version I have has the latest pgsql2shp in it and its about a week or 2 
old.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>I tested with dumping out a spatial table from my 2.0 database 
and it worked fine.  It could be an issue with parameters. (though the 
error you describe is a bit bizarre since gid is not needed to dump out a 
spatial table)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>Can you give us the following bits of 
information</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>1) pgsql2shp -- with no args -- what does the version number 
say </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>Mine reads -- the below</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>RCSID: $Id: pgsql2shp.c 5450 2010-03-22 19:38:14Z pramsey $ 
RELEASE: 2.0 USE_GEOS=1 USE_PROJ=1 USE_STATS=1</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>2) What command line switches are you using - an example would 
be nice</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>I tested with this</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>pgsql2shp -f C:\cities -h localhost -p 5439 -u postgres 
postgis_test20 cities</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>and worked fine for me</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>3) Version of PostgreSQL you are running</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>4) Output of the below</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>SELECT postgis_scripts_released()</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>mine reads</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>2.0 r5793</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>5) Your operating system</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>Thanks,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=431310706-27082010><FONT color=#0000ff 
size=2 face=Arial>Regina</FONT></SPAN></DIV><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> 
postgis-users-bounces@postgis.refractions.net 
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of </B>Denis 
Rykov<BR><B>Sent:</B> Thursday, August 26, 2010 10:51 PM<BR><B>To:</B> 
postgis-users@postgis.refractions.net<BR><B>Subject:</B> [postgis-users] 
pgsql2shp fails<BR></FONT><BR></DIV>
<DIV></DIV>Hi, just updated to 2.0svn and it seems that new pgsql2shp fails with 
new db, but works with 1.5 ones, pgsql2shp from 1.5 works fine with 
both<BR>keeps saying "column "gid" does not exist" even on fresh tables where 
SELECT AddGeometryColumn was done<BR></BODY></HTML>