Re: Psql meta-command conninfo+

Jim Jones <jim.jones@uni-muenster.de>

From: Jim Jones <jim.jones@uni-muenster.de>
To: Hunaid Sohail <hunaidpgml@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>, pgsql-hackers@postgresql.org, Maiquel Grassi <grassi@hotmail.com.br>, Nathan Bossart <nathandbossart@gmail.com>, "Imseih (AWS), Sami" <simseih@amazon.com>, Peter Eisentraut <peter@eisentraut.org>, Pavel Luzanov <p.luzanov@postgrespro.ru>, Erik Wienhold <ewie@ewie.name>
Date: 2024-09-30T18:16:09Z
Lists: pgsql-hackers
Hi

On 26.09.24 09:15, Hunaid Sohail wrote:
> This patch renames "Current User" to "Authenticated User" as suggested
> by me in my last email. I have also updated the documentation accordingly.

Could you perhaps in the documentation elaborate a bit more on the
difference between "Current User" and "Authenticated User"? IMHO a
couple of words on how exactly they differ would be very helpful, as
they show the same user in many cases.

> Authenticated User: The name of the user returned by PQuser()
> Session User: The session user's name.

Although a bit redundant, I'd argue that "SSL Compression" is better
than just "Compression".

Other than that, it looks much better now:

$ /usr/local/postgres-dev/bin/psql -x "\
    host=server.uni-muenster.de
    hostaddr=192.168.178.27
    user=jim dbname=db
    port=54322
    sslmode=verify-full
    sslrootcert=server-certificates/server.crt
    sslcert=jim-certificates/jim.crt
    sslkey=jim-certificates/jim.key"

psql (18devel)
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384,
compression: off, ALPN: postgresql)
Type "help" for help.

db=# SET client_encoding TO 'LATIN1';
SET

db=# \conninfo+
Connection Information
-[ RECORD 1 ]--------+-----------------------
Database             | db
Authenticated User   | jim
Session User         | jim
Host                 | server.uni-muenster.de
Host Address         | 192.168.178.27
Port                 | 54322
Protocol Version     | 3
SSL Connection       | true
SSL Protocol         | TLSv1.3
SSL Cipher           | TLS_AES_256_GCM_SHA384
Compression          | off
ALPN                 | postgresql
GSSAPI Authenticated | false
Client Encoding      | LATIN1
Server Encoding      | UTF8
Backend PID          | 874890


Thanks!



Commits

  1. psql: Change new \conninfo to use SSL instead of TLS

  2. Change \conninfo to use tabular format

  3. Update extension lookup routines to use the syscache

  4. Improve COPY TO performance when server and client encodings match

  5. doc: Remove superfluous bracket in synopsis

  6. Remove psql support for server versions preceding 9.2.