From 27f69c2f44564b47a8f0caa31f9406468e9e77a9 Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Thu, 19 May 2022 17:42:07 +0800 Subject: [PATCH v2] Document the default location of the PGSERVICEFILE on Windows. Per report from Dominique Devienne. Author: Julien Rouhaud Discussion: https://postgr.es/m/CAFCRh-_mdLrh8eYVzhRzu4c8bAFEBn=rwoHOmFJcQOTsCy5nig@mail.gmail.com --- doc/src/sgml/libpq.sgml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 40035d7656..105b1bd94b 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -7787,9 +7787,12 @@ 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 ). + connection service file (see ). If not + set, it defaults to ~/.pg_service.conf. On + Microsoft Windows, it defaults to + %APPDATA%\postgresql\.pg_service.conf (where + %APPDATA% refers to the Application Data + subdirectory in the user's profile). @@ -8161,9 +8164,12 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough) Service names can be defined in either a per-user service file or a system-wide file. If the same service name exists in both the user - and the system file, the user file takes precedence. - By default, the per-user service file is located - at ~/.pg_service.conf; this can be overridden by + and the system file, the user file takes precedence. By default, the + per-user service file is located at ~/.pg_service.conf. + On Microsoft Windows, it is located at + %APPDATA%\postgresql\.pg_service.conf (where + %APPDATA% refers to the Application Data subdirectory + in the user's profile). In either case, the location can be overridden by setting the environment variable PGSERVICEFILE. The system-wide file is named pg_service.conf. By default it is sought in the etc directory -- 2.33.1