diff options
author | Michael Paquier <michael@paquier.xyz> | 2024-12-18 15:16:12 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2024-12-18 15:16:12 +0900 |
commit | 477728b5d6fa16461b81cd22b0568fec1eab97ac (patch) | |
tree | 5f675621947600a0d6e74be65e20a02380a4769f /doc/src | |
parent | 4b99fed7541e330b669fe488a274c0c69490391c (diff) | |
download | postgresql-477728b5d6fa16461b81cd22b0568fec1eab97ac.tar.gz postgresql-477728b5d6fa16461b81cd22b0568fec1eab97ac.zip |
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 4b99fed7541e, 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
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/psql-ref.sgml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index e42073ed748..72f3347e53d 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -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> |