Configuring radar
radar takes its settings from command-line options and from the standard PostgreSQL environment variables; radar has no configuration file.
Setting the Connection Defaults
The -h, -U, and -d options are optional, and radar resolves each value as
follows:
-hfalls back toPGHOST, and then tolocalhostover TCP; radar does not default to a Unix-domain socket.-Ufalls back toPGUSER, then to the name of the current operating system user, and then topostgreswhen radar cannot determine that user.-dfalls back toPGDATABASE, and then topostgres; with--skip-system, radar requires a database name from-dorPGDATABASE.
Setting Environment Variables
The following table describes the environment variables that radar reads:
| Variable | Description |
|---|---|
PGHOST |
Specifies the PostgreSQL host. |
PGPORT |
Specifies the PostgreSQL port. |
PGUSER |
Specifies the PostgreSQL user name. |
PGPASSWORD |
Specifies the PostgreSQL password. |
PGPASSFILE |
Names the password file that the driver reads when no password is supplied; the default is ~/.pgpass. |
PGDATABASE |
Specifies the PostgreSQL database name. |
PGSSLMODE |
Specifies the SSL mode: prefer, disable, require, verify-ca, or verify-full. radar rejects any other value. |
PGSSLCERT |
Specifies the client SSL certificate file. |
PGSSLKEY |
Specifies the client SSL private key file. |
PGSSLROOTCERT |
Specifies the SSL root (CA) certificate file. |
KRB5CCNAME |
Names the Kerberos credential cache for GSSAPI authentication; radar reads only a FILE: cache, and the default is /tmp/krb5cc_<uid>. |
KRB5_CONFIG |
Names the Kerberos configuration file; the default is /etc/krb5.conf. |
The pgx driver also applies some other libpq environment variables, such as
PGAPPNAME and PGCONNECT_TIMEOUT. pgx does not support PGSSLCRL or
PGSSLCRLDIR, so radar does not check certificate revocation lists.