psql: Add variable SERVICEFILE
Michael Paquier <michael@paquier.xyz>
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 commits 092f3c63efc6 and fef6da9e9c87 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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/psql-ref.sgml | modified | +9 −0 |
| src/bin/psql/command.c | modified | +7 −0 |
Discussion
- PGSERVICEFILE as part of a normal connection string 35 messages · 2024-11-18 → 2025-07-14