From 41a4e45957e19e962352848fdcd8316353d30379 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 20 Jan 2010 21:15:21 +0000 Subject: Add user-specific .pg_service.conf file This extends the existing pg_service.conf facility to first look for a service definition file in the user's home directory. --- doc/src/sgml/libpq.sgml | 51 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 8 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index cfa87d0adae..a5386cf333d 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1,4 +1,4 @@ - + <application>libpq</application> - C Library @@ -5791,6 +5791,18 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough) + + + + PGSERVICEFILE + + PGSERVICEFILE specifies the name of the per-user + connection service file. If not set, it defaults + to ~/.pg_service.conf + (see ). + + + @@ -5987,7 +5999,8 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough) PGSYSCONFDIR PGSYSCONFDIR sets the directory containing the - pg_service.conf file. + pg_service.conf file and in a future version + possibly other system-wide configuration files. @@ -6063,6 +6076,9 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough) pg_service.conf + + .pg_service.conf + The connection service file allows libpq connection parameters to be @@ -6074,12 +6090,31 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough) - To use this feature, copy - share/pg_service.conf.sample to - etc/pg_service.conf and edit the file to add - service names and parameters. This file can be used for client-only - installs too. The file's location can also be specified by the - PGSYSCONFDIR environment variable. + The connection service file can be a per-user service file + at ~/.pg_service.conf or the location + specified by the environment variable PGSERVICEFILE, + or it can be a system-wide file + at etc/pg_service.conf or in the directory + specified by the environment variable + PGSYSCONFDIR. If service definitions with the same + name exist in the user and the system file, the user file takes + precedence. + + + + The file uses an INI file format where the section + name is the service name and the parameters are connection + parameters; see for a list. For + example: + +# comment +[mydb] +host=somehost +port=5433 +user=admin + + An example file is provided at + share/pg_service.conf.sample. -- cgit v1.2.3