How can I call psql so that it doesn\'t prompt for a password?
This is what I have:
psql -Umyuser < myscript.sql
If you're having problems on windows like me (I'm using Windows 7 64-bit) and set PGPASSWORD=[Password]
did not work.
Then, as Kavaklioglu said in one of the comments,
export PGPASSWORD=[password]
You will need to save this at the top of the file, or before any usage so its set before being called.
Certainly does work on windows :)