Scripted login to a PostgreSQL database using psql
Part I.
Miscellaneous subjects (and those still to be sorted)
Scripted login to a PostgreSQL database using psql
JurjenBokma
February 2011
The PostgreSQL Wiki shows that the environment variables PGUSER and PGPASSWORD can be used, as well as a file ~/.pgpass (or anything referenced by PGPASSFILE), with the format: