mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
psql: Add more information about service name
This commit adds support for the following items in psql, able to show a
service name, when available:
- Variable SERVICE.
- Substitution %s in PROMPT{1,2,3}.
This relies on 4b99fed754
, that has made the service name available in
PGconn for libpq.
Author: Michael Banck
Reviewed-by: Greg Sabino Mullane
Discussion: https://postgr.es/m/6723c612.050a0220.1567f4.b94a@mx.google.com
This commit is contained in:
@ -4380,6 +4380,15 @@ bar
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="app-psql-variables-service">
|
||||
<term><varname>SERVICE</varname></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The service name, if applicable.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="app-psql-variables-shell-error">
|
||||
<term><varname>SHELL_ERROR</varname></term>
|
||||
<listitem>
|
||||
@ -4674,6 +4683,11 @@ testdb=> <userinput>INSERT INTO my_table VALUES (:'content');</userinput>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="app-psql-prompting-s">
|
||||
<term><literal>%s</literal></term>
|
||||
<listitem><para>The name of the service.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="app-psql-prompting-slash">
|
||||
<term><literal>%/</literal></term>
|
||||
<listitem><para>The name of the current database.</para></listitem>
|
||||
|
Reference in New Issue
Block a user