psql: Add more information about service name
authorMichael Paquier <[email protected]>
Wed, 18 Dec 2024 06:16:12 +0000 (15:16 +0900)
committerMichael Paquier <[email protected]>
Wed, 18 Dec 2024 06:16:12 +0000 (15:16 +0900)
commit477728b5d6fa16461b81cd22b0568fec1eab97ac
tree5f675621947600a0d6e74be65e20a02380a4769f
parent4b99fed7541e330b669fe488a274c0c69490391c
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[email protected]
doc/src/sgml/ref/psql-ref.sgml
src/bin/psql/command.c
src/bin/psql/prompt.c