On 1/3/15 7:56 PM, Tom Lane wrote: > Noah Misch <n...@leadboat.com> writes: >> On Sat, Jan 03, 2015 at 02:36:50PM -0500, Noah Misch wrote: >>> The directory libpq consults is `pg_config --sysconfdir` > >> I was wrong there. `pg_config --sysconfig` uses get_etc_path(), which >> adjusts >> to post-installation moves of the installation tree. parseServiceInfo() uses >> the build-time SYSCONFDIR directly. > > Ugh. That makes things messy. Still, we're probably better off > recommending `pg_config --sysconfdir` than anything else. I doubt > that the theoretical ability to do a post-installation move is used > much, and it's certainly not used by people using a prepackaged build. > So the recommendation would only be wrong for someone who had done such > a move manually, and they'd probably know what to do anyway.
At least writing `pg_config --sysconfdir` indicates that it's in an installation-specific location, whereas hardcoding /etc will create confusion when it's not actually there. (Incidentally, we use /usr/local/pgsql/etc elsewhere in the documentation as a sample location.) I propose the attached patch.
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index e5cab37..75a4d51 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -6957,7 +6957,7 @@ <title>The Connection Service File</title> at <filename>~/.pg_service.conf</filename> or the location specified by the environment variable <envar>PGSERVICEFILE</envar>, or it can be a system-wide file - at <filename>/etc/pg_service.conf</filename> or in the directory + at <filename>`pg_config --sysconfdir`/pg_service.conf</filename> or in the directory specified by the environment variable <envar>PGSYSCONFDIR</envar>. If service definitions with the same name exist in the user and the system file, the user file takes
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers