RE: Psql meta-command conninfo+

From: Maiquel Grassi <grassi(at)hotmail(dot)com(dot)br>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Erik Wienhold <ewie(at)ewie(dot)name>, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: Psql meta-command conninfo+
Date: 2024-02-10 17:38:23
Message-ID: CP8P284MB24967BCC7B831598BA42B22EEC4A2@CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>Database | postgres
>[...]
>Host | 127.0.0.1
>Encryption | SSL
>Protocol | PQsslAttribute(protocol)
>Cipher | PQsslAttribute(cipher)
>Compression | PQsslAttribute(compression)
>
>When GSS, like this
>
>Database | postgres
>[...]
>Host | 127.0.0.1
>Encryption | GSS

--//--

Hi PgHackers,

Columns were added for SSL and GSS.

For SSL, I conducted some tests as follows. For GSS, I will perform
them and intend to provide a sample here in the next interaction.

If anyone can and wants to test GSSAPI as well, I appreciate it.

[postgres(at)localhost bin]$ ./psql -h localhost -p 5432 -x

psql (17devel)
Type "help" for help.

postgres=# \conninfo
You are connected to database "postgres" as user "postgres" on host "localhost" (address "::1") at port "5432".
postgres=# \conninfo+
Current Connection Information
-[ RECORD 1 ]------+----------
Database | postgres
Authenticated User | postgres
System User |
Current User | postgres
Session User | postgres
Backend PID | 15809
Server Address | ::1
Server Port | 5432
Client Address | ::1
Client Port | 56890
Socket Directory |
Host | localhost

postgres=# \q
[postgres(at)localhost bin]$ ./psql -h localhost -p 5433 -x
psql (17devel, server 15.6)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, compression: off)
Type "help" for help.

postgres=# \conninfo
You are connected to database "postgres" as user "postgres" on host "localhost" (address "::1") at port "5433".
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, compression: off)
postgres=# \conninfo+
Current Connection Information
-[ RECORD 1 ]------+----------------------------
Database | postgres
Authenticated User | postgres
Current User | postgres
Session User | postgres
Backend PID | 15811
Server Address | ::1
Server Port | 5433
Client Address | ::1
Client Port | 40622
Socket Directory |
Host | localhost
Encryption | SSL
Protocol | TLSv1.2
Cipher | ECDHE-RSA-AES256-GCM-SHA384
Compression | off

Regards,
Maiquel Grassi.

Attachment Content-Type Size
v13-0001-psql-meta-command-conninfo-plus.patch application/octet-stream 9.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2024-02-10 18:28:29 Re: [PATCH] Add native windows on arm64 support
Previous Message rs.trevk 2024-02-10 17:26:29 Feature request support MS Entra ID Authentication from On-premises PostreSQL server