|Prev||Chapter 44. libpq||Next|
The following environment variables can be used to set up default environment values to avoid hard-coding database names into an application program:
PGHOST sets the default server name.
PGOPTIONS sets additional runtime options for the Postgres backend.
PGPORT sets the default port for communicating with the Postgres backend.
PGTTY sets the file or tty on which debugging messages from the backend server are displayed.
PGDATABASE sets the default Postgres database name.
PGREALM sets the Kerberos realm to use with Postgres, if it is different from the local realm. If PGREALM is set, Postgres applications will attempt authentication with servers for this realm and use separate ticket files to avoid conflicts with local ticket files. This environment variable is only used if Kerberos authentication is enabled.
|libpq||Up||Database Connection Functions|
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.