mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
psql: Add variable SERVICEFILE
This new psql variable can be used to check which service file has been used for a connection. Like other variables, this can be set in a PROMPT or reported by an \echo, like these commands: \echo :SERVICEFILE \set PROMPT1 '=(%:SERVICEFILE:)%# ' This relies on commits092f3c63ef
andfef6da9e9c
to retrieve this information from the connection's PQconninfoOption. Author: Ryo Kanbayashi <kanbayashi.dev@gmail.com> Discussion: https://postgr.es/m/CAKkG4_nCjx3a_F3gyXHSPWxD8Sd8URaM89wey7fG_9g7KBkOCQ@mail.gmail.com
This commit is contained in:
@ -4623,6 +4623,15 @@ 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>
|
||||
|
Reference in New Issue
Block a user