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

From Maiquel Grassi
Subject RE: Psql meta-command conninfo+
Date
Msg-id CP8P284MB24960077EA004AD1258EDE40EC4B2@CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM
Whole thread Raw
In response to Re: Psql meta-command conninfo+  (Nathan Bossart <nathandbossart@gmail.com>)
List pgsql-hackers
>Sorry if this has been brought up, but I noticed that some of the

>information is listed below the result set:
>
  >      postgres=# \conninfo+
  >    Current Connection Information
  >      -[ RECORD 1 ]------+---------
  >     Database           | postgres
  >      Authenticated User | nathan
  >      System User        |
  >      Current User       | nathan
  >      Session User       | nathan
  >     Session PID        | 659410
  >      Server Version     | 17devel
  >      Server Address     | ::1
  >      Server Port        | 5432
  >      Client Address     | ::1
  >      Client Port        | 59886
  >      Socket Directory   |
  >      Host               | ::1

  >      SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)

>Shouldn't we move this information into the result set?  Separately, does
>the server version really belong here?  I'm not sure I would consider that
>to be connection information.

--//--

Hi Nathan,


The "Server Version" information is closely related to the connection. However,
it does seem to be an element that does not belong to this set. I removed this
column and left only what is truly connection info.

Regarding the functions "printSSLInfo()" and "printGSSInfo()", I agree that we
should include them in the returned dataset (as two additional columns). A good
argument is that this will make more sense when using \x (Expanded display).
However, they are declared and defined within the "command.c" file. To make
calls to "printSSLInfo()" and "printGSSInfo()" within "describe.c", we would need
to move their declarations to a new header and create a new C file. I believe
something like "ssl_gss_info.h" and "ssl_gss_info.c". I'm not sure, but at first glance,
this is what occurs to me. Do you have any better or more concise suggestions
for resolving this?

Regards,
Maiquel Grassi.

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Make COPY format extendable: Extract COPY TO format implementations
Next
From: Julien Rouhaud
Date:
Subject: Re: Small fix on query_id_enabled