diff -cr cvs/pgsql/doc/src/sgml/libpq.sgml cvs.build/pgsql/doc/src/sgml/libpq.sgml *** cvs/pgsql/doc/src/sgml/libpq.sgml 2006-05-15 22:59:38.000000000 +0200 --- cvs.build/pgsql/doc/src/sgml/libpq.sgml 2006-05-16 11:13:47.000000000 +0200 *************** *** 4000,4011 **** entries first when you are using wildcards.) If an entry needs to contain : or \, escape this character with \. - A hostname of localhost matches both host (TCP) - and local (Unix domain socket) connections coming from the - local machine. The permissions on .pgpass must disallow any access to world or group; achieve this by the command chmod 0600 ~/.pgpass. --- 4000,4032 ---- entries first when you are using wildcards.) If an entry needs to contain : or \, escape this character with \. + To match local (Unix domain socket) connections coming from the + local machine, put the path to the Unix domain socket file in the + hostname field. So if the socket file you use to + access the database is for example + /var/run/postgresql/.s.PGSQL.5432, you would set + hostname to + \/var\/run\/postgresql and port to 5432. + + + + + In psql you can always find out the current values + of your connection by issuing the \set command. If you want + to authenticate this very connection automatically via the + .pgpass file, just use the shown values for + hostname, port, + database and username. + (Other applications can use the libpq functions + described in to retrieve the respective values + for their current connection.) + + + + The permissions on .pgpass must disallow any access to world or group; achieve this by the command chmod 0600 ~/.pgpass.