[postgis-users] Error using pgsql2shp

Graham Stewart graham at mobilefoundry.net
Wed Jun 14 14:37:09 PDT 2006


Bruce Rindahl wrote:
> I am trying to convert a PostgreSQL/PostGIS table to a shapefile.  The table
> looks fine and the geometry is good based on a web application.  PostGIS
> version 1.1.2 and the RCSID for pgsql2shp is:
> $Id: pgsql2shp.c,v 1.84 2006/04/18 14:09:28 strk Exp $
>
> My command line is:
> pgsql2shp -f test.shp DWR dwr_gis
>
> where the database is DWR and the table is dwr_gis
>
> I get:
> FATAL:  database "Bruce" does not exist
>
> "Bruce" is my user name on WinXP
>   

I've had similar problems on XP.

After some screwing around, I found the following syntax worked:

pgsql2shp -u dbusername -P dbpassword  -h dbhostname -f outputFile
dbname queryString

Graham



More information about the postgis-users mailing list