public inbox for [email protected]  
help / color / mirror / Atom feed
From: Alvaro Herrera <[email protected]>
To: Peter Eisentraut <[email protected]>
Cc: Maiquel Grassi <[email protected]>
Cc: Imseih (AWS), Sami <[email protected]>
Cc: Nathan Bossart <[email protected]>
Cc: Jim Jones <[email protected]>
Cc: Pavel Luzanov <[email protected]>
Cc: Erik Wienhold <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Psql meta-command conninfo+
Date: Thu, 4 Apr 2024 17:53:37 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 2024-Apr-04, Peter Eisentraut wrote:

> But I don't really see the point of this.  The information you are querying
> is already available in various system views.  This proposal is just a
> shorthand for a collection of various random things some people like to see.
> Like, by what reason is application name included as connection info?  Why
> not any other session settings?  What about long-term maintenance: By what
> logic should things be added to this?

Usability is precisely the point.  You could also claim that we don't
need \dconfig, since you could get the same thing by querying
pg_settings for non-default settings.  But \dconfig is very handy.  I
expect \conninfo+ to be equally useful.  We don't give up command
history just on the grounds that you can obtain the same effect by
retyping the command.


I'm not sure to what extent is it useful to make a distinction between
the values that the client knows from those that the server knows.  If
it is, then we can redefine \conninfo+ to use the client values.

The point about application_name is a valid one.  I guess it's there
because it's commonly given from the client side rather than being set
server-side, even though it's still a GUC.  Arguably we could remove it
from \conninfo+, and claim that nothing that shows up in \dconfig should
also appear in \conninfo+.  Then users should get in the habit of using
both to obtain a full picture.  This sounds to me a very good compromise
actually.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
Tom: There seems to be something broken here.
Teodor: I'm in sackcloth and ashes...  Fixed.
                               http://postgr.es/m/[email protected]






view thread (3+ 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], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Psql meta-command conninfo+
  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