diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 480b08d2cf..6a05567d87 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1,5 +1,5 @@ @@ -2047,7 +2047,8 @@ sets the user name used to connect to the database and for authentication. PGPASSWORD sets the password used if the backend demands password authentication. This functionality is deprecated for security -reasons; consider migrating to use the $HOME/.pgpass +reasons; consider migrating to use the +$HOME/.pgpass file. @@ -2133,6 +2134,11 @@ for information on correct values for these environment variables. files + + + password + .pgpass + $HOME/.pgpass is a file that can contain passwords to be used if the connection requires a password. This file should have the format: @@ -2144,6 +2150,11 @@ anything. The first match will be used so put more specific entries first. Entries with : or \ should be escaped with \. + +The permissions on $HOME/.pgpass must disallow any +access to world or group; achieve this by the command +chmod 0600 $HOME/.pgaccess. +If the permissions are less strict than this, the file will be ignored.