I do this by setting PGPASSWD, since you may want to do this in an
unsupervised mode from a shell script:

 

PGPASSWORD=$pgpasswd

 

Works for me using the GNU tools for windows bash shell, and in bash on
linux and OSX.

 

Robert W. Burgholzer

Surface Water Modeler

Office of Water Supply and Planning

Virginia Department of Environmental Quality

[EMAIL PROTECTED]

804-698-4405

Open Source Modeling Tools:

http://sourceforge.net/projects/npsource/

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Stephen Crawford
Sent: Monday, March 03, 2008 3:02 PM
To: 'PostGIS Users Discussion'
Subject: RE: [postgis-users] shp2pgsql not loading table in Postgis

 

I have had the same problem; it seems having to add the password screws
things up.  Instead of making the sql and loading the table all in one
step (as you are trying to do), try it in two steps:

 

1) Make the sql:   shp2pgsql.exe -s 4148 c:\province.shp province >
province.sql

 

2) log in to psql and then use the \i command to load the table:  \i
province.sql

 

 

Steve

 

Stephen Crawford
Center for Environmental Informatics
The Pennsylvania State University
 

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Intengu Technologies
Sent: Thursday, February 28, 2008 1:47 PM
To: PostGIS Users Discussion
Subject: [postgis-users] shp2pgsql not loading table in Postgis

I am running Windows with Postgis 1.3.2 (installed using Appication
Stack Builder) on Postgresql 8.3 on running shp2pgsql.exe -s 4148
c:\province.shp province | psql -d spatialdb -U username and then
entering password, the table is not loaded.  What could I be doing
wrong.
-- 
Sindile Bidla 

_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to