How can I call psql so that it doesn\'t prompt for a password?
This is what I have:
psql -Umyuser < myscript.sql
An alternative to using PGPASSWORD
environment variable is to use conninfo
string according to the documentation
An alternative way to specify connection parameters is in a conninfo string or a URI, which is used instead of a database name. This mechanism give you very wide control over the connection.
$ psql "host= port=5432 dbname= user= password="
postgres=>