Sample Header Ad - 728x90

Batch for PostgreSQL query

1 vote
2 answers
5055 views
1) The pgpass.conf (of PostgreSQL) is: localhost:5432:*:postgres:mypassword I have no experience with batch and I have spent the day searching in the net. I'm using Windows - if that matters. 2) I tried with a file.bat as: cd C: start "" "C:\Program Files\PostgreSQL\9.4\bin\psql.exe" "C:\Users\utente\Desktop\1Giswater impNode.sql" pause start "" "C:\Program Files\PostgreSQL\9.4\bin\psql.exe" "C:\Users\utente\Desktop\2Giswater impArc.sql" pause start "" "C:\Program Files\PostgreSQL\9.4\bin\psql.exe" "C:\Users\utente\Desktop\3assegnazione enet.sql" pause After typing my password the result is: psql: fe_sendauth: no password supplied 3) I've written a simple file.bat, which is: cd C:\Program Files\PostgreSQL\9.4\bin\ pause rem psql --help pause psql -e -a -f="C:\Users\utente\Desktop\1Giswater impNode.sql" -d=postgres -U=postgres The result is: psql: opzione di connessione errata What am I missing?
Asked by Sandra (23 rep)
Aug 18, 2015, 01:52 PM
Last activity: Jan 22, 2024, 08:09 AM