1.10. Environment Variables

The following environment variables can be used to select default connection parameter values, which will be used by PQ-connectdb, PQ-setdb-login and PQ-setdb if no value is directly specified by the calling code. These are useful to avoid hard-coding database connection information into simple client applications.

The following environment variables can be used to specify user-level default behavior for every PostgreSQL session:

The following environment variables can be used to specify default internal behavior for every PostgreSQL session:

Refer to the SET SQL command for information on correct values for these environment variables.