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

From Imseih (AWS), Sami
Subject Re: Psql meta-command conninfo+
Date
Msg-id 34ED9815-4F2F-495A-9127-25C43F4E7266@amazon.com
Whole thread Raw
In response to RE: Psql meta-command conninfo+  (Maiquel Grassi <grassi@hotmail.com.br>)
Responses RE: Psql meta-command conninfo+
List pgsql-hackers

Hi,

 

Thanks for working on this.

 

I have a few comments about the current patch.

 

1/ I looked through other psql-meta commands and the “+” adds details but

does not change output format. In this patch, conninfo and conninfo+

have completely different output. The former is a string with all the details

and the latter is a table. Should conninfo just be a table with the minimal info

and additional details can be displayed with "+" appended?

 

instead of \conninfo displaying a string

 

You are connected to database "postgres" as user "postgres" on host "127.0.01" (address "127.0.0.1") at port "5432".

 

It can instead display the same information in table format

 

Current Connection Information

-[ RECORD 1 ]-----------+-----------------------

Database                      | postgres

Authenticated User    | postgres

Socket Directory         |

Host                              | 127.0.0.1

Port                               | 5432

 

and \conninfo+ can show the rest of the details

 

Current Connection Information

-[ RECORD 1 ]----------+----------------------------

Database                     | postgres

Authenticated User   | postgres

Socket Directory        |

Host                             | 127.0.0.1

Port                             | 5432

Backend PID               | 1234

...

.....

 

2/ GSSAPI details should show the full details, such as "principal",

"encrypted" and "credentials_delegated".

 

This also means that pg_stat_ssl will need to be joined with pg_stat_gssapi

 

FROM

pg_catalog.pg_stat_ssl ssl LEFT JOIN pg_catalog.pg_stat_gssapi gssapi

ON ssl.pid = gssapi.pid

ssl.pid = pg_catalog.pg_backend_pid()

 

 

3/ A very nice to have is "Application Name", in the case one

sets the application_name within a connection or in the connection string.

 

Regards,

 

Sami Imseih

Amazon Web Services (AWS)

 

 

 

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Combine Prune and Freeze records emitted by vacuum
Next
From: Jelte Fennema-Nio
Date:
Subject: Re: Possibility to disable `ALTER SYSTEM`