pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: psql: Add variable SERVICEFILE
Date: Mon, 14 Jul 2025 00:09:27 +0000
Message-ID: <E1ub6l5-006ATO-2W@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6b1c4d326b064bf0eaedccb08a7fcca5db5d9629

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml | 9 +++++++++
src/bin/psql/command.c         | 7 +++++++
2 files changed, 16 insertions(+)



Message-ID: <E1ub6l5-006ATO-2W@gemulon.postgresql.org>
Permalink:  ../E1ub6l5-006ATO-2W@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ub6l5-006ATO-2W@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: psql: Add variable SERVICEFILE
  In-Reply-To: <E1ub6l5-006ATO-2W@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox