1
0
mirror of https://github.com/postgres/postgres.git synced 2026-10-23 13:29:09 +03:00

libpq: Revert the connection option "servicefile"

The following commits are reverted:
* 092f3c63ef, libpq: Add "servicefile" connection option
* 6b1c4d326b, psql: Add variable SERVICEFILE
* 90354030b8, libpq: Fix "servicefile" after fallback to system
  service file

After more review, PGSERVICEFILE is sufficient for the purpose of
specifying a per-session service file.  Some details around this feature
will need more attention before being actually usable, if we ever get
down to it.

One independent piece that has been committed during the v19 development
cycle is df286a5b83, which is kept in the tree as that was an
unrelated change.

Reported-by: Sehrope Sarkuni <sehrope@jackdb.com>
Discussion: https://postgr.es/m/CAH7T-aq+U6GDPO8mr3Gga3KzxGpAE=BSLb38x+R8fvWjzF-H8w@mail.gmail.com
Backpatch-through: 19
This commit is contained in:
Michael Paquier
2026-10-19 07:35:06 +09:00
parent 10a0dcfc25
commit cbe71bac54
6 changed files with 13 additions and 181 deletions

View File

@@ -2320,19 +2320,6 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
</listitem>
</varlistentry>
<varlistentry id="libpq-connect-servicefile" xreflabel="servicefile">
<term><literal>servicefile</literal></term>
<listitem>
<para>
This option specifies the name of the per-user connection service file
(see <xref linkend="libpq-pgservice"/>).
Defaults to <filename>~/.pg_service.conf</filename>, or
<filename>%APPDATA%\postgresql\.pg_service.conf</filename> on
Microsoft Windows.
</para>
</listitem>
</varlistentry>
<varlistentry id="libpq-connect-target-session-attrs" xreflabel="target_session_attrs">
<term><literal>target_session_attrs</literal></term>
<listitem>
@@ -9170,8 +9157,12 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough)
<indexterm>
<primary><envar>PGSERVICEFILE</envar></primary>
</indexterm>
<envar>PGSERVICEFILE</envar> behaves the same as the
<xref linkend="libpq-connect-servicefile"/> connection parameter.
<envar>PGSERVICEFILE</envar> specifies the name of the per-user
connection service file
(see <xref linkend="libpq-pgservice"/>).
Defaults to <filename>~/.pg_service.conf</filename>, or
<filename>%APPDATA%\postgresql\.pg_service.conf</filename> on
Microsoft Windows.
</para>
</listitem>
@@ -9612,8 +9603,7 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough)
On Microsoft Windows, it is named
<filename>%APPDATA%\postgresql\.pg_service.conf</filename> (where
<filename>%APPDATA%</filename> refers to the Application Data subdirectory
in the user's profile). A different file name can be specified using the
<literal>servicefile</literal> key word in a libpq connection string or by
in the user's profile). A different file name can be specified by
setting the environment variable <envar>PGSERVICEFILE</envar>.
The system-wide file is named <filename>pg_service.conf</filename>.
By default it is sought in the <filename>etc</filename> directory

View File

@@ -4688,15 +4688,6 @@ bar
</listitem>
</varlistentry>
<varlistentry id="app-psql-variables-servicefile">
<term><varname>SERVICEFILE</varname></term>
<listitem>
<para>
The service file name, if applicable.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-variables-shell-error">
<term><varname>SHELL_ERROR</varname></term>
<listitem>