Hi David,

Thank you for your feedback.

On Fri, Oct 4, 2024 at 11:56 AM David G. Johnston <
david.g.johns...@gmail.com> wrote:

> It seems to me a more useful definition for what this command should print
> out is basically the entire contents of:
>
> https://www.postgresql.org/docs/current/libpq-status.html
>
> That page has three sections:
> Connection Invariants
> Current Status
> Encryption (TLS)
>
> I would suggest that we thus produce three tables - one for each.  In the
> case of SSL, a message saying “not used” instead of a table full of blanks
> probably suffices, though I’d lean to print all of what is available at all
> times.
>

We can try this approach. I would also like to have other's opinions on
this approach.

Most functions are already used, while some are not required (IMO). I have
listed all the functions from the doc link you provided, along with my
brief comments based on the latest patch (v35).

PQdb - already used
PQuser - already used
PQpass - no need
PQhost - already used
PQhostaddr - already used
PQport - already used
PQtty - no need
PQoptions - can be used

PQstatus - no need
PQtransactionStatus - can be used
PQparameterStatus - already used
PQprotocolVersion - already used
PQserverVersion  - no need
PQerrorMessage  - no need
PQsocket  - no need
PQbackendPID - already used
PQconnectionNeedsPassword  - no need
PQconnectionUsedPassword - can be used
PQconnectionUsedGSSAPI - already used

PQsslInUse - already used
PQsslAttribute - only key_bits attribute not used
PQsslAttributeNames  - no need
PQsslStruct  - no need
PQgetssl  - no need

For PQparameterStatus, some parameters are already used.
server_version and application_name were already discussed and removed in
v12 and v29 respectively. Do we need other parameters?


> Within that framework having \conninfo[+[CSE][…]] be the command -
> printing out only the table specified would be the behavior (specifying no
> suffix letters prints all three) - would be an option.
>

3 separate tables without suffix?

If others are okay with this, I can work on this approach and will provide
a patch before the next CF.

Regards,
Hunaid Sohail

Reply via email to