From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Maiquel Grassi <grassi(at)hotmail(dot)com(dot)br> |
Cc: | Hunaid Sohail <hunaidpgml(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, "Imseih (AWS), Sami" <simseih(at)amazon(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>, Erik Wienhold <ewie(at)ewie(dot)name>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Subject: | Re: Psql meta-command conninfo+ |
Date: | 2025-01-09 19:10:54 |
Message-ID: | 202501091910.jcxcnmexdbyb@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2024-Dec-26, Maiquel Grassi wrote:
> The previous version was good to go and ready for a commit as soon as
> the final review is finalized. About David’s proposal, I’m still a
> little unsure, but it seems like it has a lot of potential. What do
> you all think? If it’s a strong direction to explore, maybe David
> could join us as a co-author and work with us to bring the feature.
I think the idea of \conninfo+ printing multiple tables is setting up
the patch for failure. It is just too unusual. (Yes, I know "\d *" and
such can print multiple tables. That one is a disaster, perhaps the
worst psql command of all.) Also, in v36 you can specify another
character as second argument to display only one of the several tables.
How are users going to remember which is which? Most likely, they
won't.
v35 seems fine to me from a UI standpoint; I suggest we move forward
with that.
This is what I get with v36 on an unencrypted local connection:
55432 18devel 17266=# \conninfo+
Connection Information
Base de Datos │ Client User │ Socket Directory │ Port │ Opciones
───────────────┼─────────────┼──────────────────┼───────┼──────────
alvherre │ alvherre │ /tmp │ 55432 │
(1 fila)
Current Status
Protocol Version │ Password Used │ GSSAPI Authenticated │ Backend PID
──────────────────┼───────────────┼──────────────────────┼─────────────
3 │ false │ false │ 17266
(1 fila)
Server Parameter Settings
Superusuario │ Client Encoding │ Server Encoding │ Session Authorization
──────────────┼─────────────────┼─────────────────┼───────────────────────
true │ UTF8 │ UTF8 │ alvherre
(1 fila)
Connection Encryption
SSL Connection
────────────────
false
(1 fila)
Meanwhile, here's v35:
55432 18devel 20356=# \conninfo+
Connection Information
─[ RECORD 1 ]────────┬─────────
Base de Datos │ alvherre
Authenticated User │ alvherre
Session User │ alvherre
Socket Directory │ /tmp
Port │ 55432
Protocol Version │ 3
SSL Connection │ false
GSSAPI Authenticated │ false
Client Encoding │ UTF8
Server Encoding │ UTF8
Backend PID │ 20356
Or, if expanded mode is disabled, I get this
Connection Information
Base de Datos │ Authenticated User │ Session User │ Socket Directory │ Port │ Protocol Version │ SSL Connection │ GSSAPI Authenticated │ Client Encoding │ Server Encoding │ Backend PID
───────────────┼────────────────────┼──────────────┼──────────────────┼───────┼──────────────────┼────────────────┼──────────────────────┼─────────────────┼─────────────────┼─────────────
alvherre │ alvherre │ alvherre │ /tmp │ 55432 │ 3 │ false │ false │ UTF8 │ UTF8 │ 29553
(1 fila)
(If Dean get his "backslash-command-expanded" patch in, we'd get
\conninfo+x for expanded mode here, and avoid the need to have "\x auto"
in .psqlrc)
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"Small aircraft do not crash frequently ... usually only once!"
(ponder, http://thedailywtf.com/)
From | Date | Subject | |
---|---|---|---|
Next Message | Alena Rybakina | 2025-01-09 19:13:26 | Re: Sample rate added to pg_stat_statements |
Previous Message | Nathan Bossart | 2025-01-09 18:27:20 | Re: Fix a wrong errmsg in AlterRole() |