Re: Psql meta-command conninfo+ - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Psql meta-command conninfo+
Date
Msg-id 202501201140.wt4nbx5y2dyl@alvherre.pgsql
Whole thread Raw
In response to Re: Psql meta-command conninfo+  (Sami Imseih <samimseih@gmail.com>)
Responses Re: Psql meta-command conninfo+
List pgsql-hackers
On 2025-Jan-17, Sami Imseih wrote:

> > Wait a second, why do we have these here?  Aren't they already in
> > \dconfig?
> 
>  \dconfig is generated by querying pg_settings and this
> requires a halthy connection. The parameters being proposed with
> \conninfo+ are set in libpq by the server [1] and can be retrieved
> even if the connection breaks.
> 
> Some of these parameters may overlap \dconfig, but I don't see
> that as a problem.

I feel the need to step back and ask, what problem are we solving here?
Your explanation isn't wrong, but I'm not sure why does a psql user need
all these.

I think you wanted to display "is_superuser" and that seems sensible in
the context of \conninfo+, and perhaps even "role" and "in_hot_standby"
would make sense; but the rest of the parameters that libpq stores do
not seem terribly interesting or relevant here.


That leads me to also wonder why don't we change \conninfo to have this
tabular behavior instead of creating a separate command for it.  Why do
we need to keep the existing form of \conninfo?  To me it seems strictly
less useful, as it is harder to read.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"Nunca se desea ardientemente lo que solo se desea por razón" (F. Alexandre)



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Purpose of wal_init_zero
Next
From: Álvaro Herrera
Date:
Subject: Re: Replace current implementations in crypt() and gen_salt() to OpenSSL