Re: Psql meta-command conninfo+
Hunaid Sohail <hunaidpgml@gmail.com>
From: Hunaid Sohail <hunaidpgml@gmail.com>
To: Jim Jones <jim.jones@uni-muenster.de>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
Maiquel Grassi <grassi@hotmail.com.br>, Nathan Bossart <nathandbossart@gmail.com>, "Imseih (AWS),
Sami" <simseih@amazon.com>, Peter Eisentraut <peter@eisentraut.org>, Tom Lane <tgl@sss.pgh.pa.us>, Pavel Luzanov <p.luzanov@postgrespro.ru>, Erik Wienhold <ewie@ewie.name>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2024-09-13T04:49:55Z
Lists: pgsql-hackers
Attachments
- v33-0001-Add-psql-meta-command-conninfo.patch (application/x-patch) patch v33-0001
Hi,
On Thu, Sep 12, 2024 at 4:08 PM Jim Jones <jim.jones@uni-muenster.de> wrote:
> It may look like this, but it is a single record --- mind the header "-[
> RECORD 1 ]----------------+---------".
> psql was called in expanded mode:
>
> > $ /home/pgsql-17devel/bin/psql -x -p 5432
>
> "-x" or "--expanded"
>
> Example:
>
> $ psql postgres -xc "SELECT 'foo' col1, 'bar' col2"
> -[ RECORD 1 ]
> col1 | foo
> col2 | bar
>
I guess I missed the expanded mode. I have attached a new patch. Please
check the output now.
```
$ bin/psql --port=5430 postgres
psql (18devel)
Type "help" for help.
postgres=# \conninfo+
You are connected to database "postgres" as user "hunaid" via socket in
"/tmp" at port "5430".
Connection Information
Protocol Version | SSL Connection | GSSAPI Authenticated | Client Encoding
| Server Encoding | Session User | Backend P
ID
------------------+----------------+----------------------+-----------------+-----------------+--------------+----------
---
3 | no | no | UTF8
| UTF8 | hunaid | 55598
(1 row)
postgres=# \x
Expanded display is on.
postgres=# \conninfo+
You are connected to database "postgres" as user "hunaid" via socket in
"/tmp" at port "5430".
Connection Information
-[ RECORD 1 ]--------+-------
Protocol Version | 3
SSL Connection | no
GSSAPI Authenticated | no
Client Encoding | UTF8
Server Encoding | UTF8
Session User | hunaid
Backend PID | 55598
```
Regards,
Hunaid Sohail
Commits
-
psql: Change new \conninfo to use SSL instead of TLS
- 6d6480066c1a 18.0 landed
-
Change \conninfo to use tabular format
- bba2fbc6238b 18.0 landed
-
Update extension lookup routines to use the syscache
- d8df7ac5c04c 18.0 cited
-
Improve COPY TO performance when server and client encodings match
- b619852086ed 17.0 cited
-
doc: Remove superfluous bracket in synopsis
- fdfb92c0307c 17.0 cited
-
Remove psql support for server versions preceding 9.2.
- cf0cab868aa4 15.0 cited