public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Michael Banck <[email protected]>
Cc: Greg Sabino Mullane <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: [PATCH] Add support for displaying database service in psql prompt
Date: Tue, 17 Dec 2024 16:43:21 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<CAKAnmmKhnHGp4X3FvMAicRsbyiKTWwMJ6oWdkRw2oLVzdeL-0A@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
On Mon, Dec 16, 2024 at 10:57:49PM +0100, Michael Banck wrote:
> Thanks, I have added the documentation now in v2.
The doc additions seem fine to me. I've just grabbed three tiny nits,
nothing critical.
+ case 's':
+ if (PQservice(pset.db))
+ strlcpy(buf, PQservice(pset.db), sizeof(buf));
+ break;
Other code paths of get_prompt check for pset.db being NULL. True
that it does not matter when calling PQservice() with a connection
that does not exist. For consistency with the surroundings this
should be done at least?
+ <para>
+ The service from <filename>pg_service.conf</filename>, if applicable.
+ </para>
pg_service.conf is not especially true as it depends on the
environment used. For psql, perhaps just use "The service name, if
applicable". No need to be fancy.
--- a/src/interfaces/libpq/exports.txt
+++ b/src/interfaces/libpq/exports.txt
@@ -205,3 +205,4 @@ PQcancelFinish 202
[...]
+PQservice 206
You didn't miss that, nice.
+ <varlistentry id="app-psql-prompting-s">
+ <term><literal>%s</literal></term>
+ <listitem><para>The name of the service entry, if any.</para></listitem>
+ </varlistentry>
Other entries don't use "if any", would just cut it.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, ../[email protected]/2-signature.asc)
download
view thread (13+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: [PATCH] Add support for displaying database service in psql prompt
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox