Re: Psql meta-command conninfo+

Sami Imseih <samimseih@gmail.com>

From: Sami Imseih <samimseih@gmail.com>
To: Hunaid Sohail <hunaidpgml@gmail.com>
Cc: Maiquel Grassi <grassi@hotmail.com.br>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Jim Jones <jim.jones@uni-muenster.de>, Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Nathan Bossart <nathandbossart@gmail.com>, "Imseih (AWS), Sami" <simseih@amazon.com>, Peter Eisentraut <peter@eisentraut.org>, Pavel Luzanov <p.luzanov@postgrespro.ru>, Erik Wienhold <ewie@ewie.name>, "David G. Johnston" <david.g.johnston@gmail.com>
Date: 2025-01-09T16:56:36Z
Lists: pgsql-hackers
> If we loop through conn->pstatus, we will be bypassing the official API.
> The list is of type pgParameterStatus, which is an internal struct defined in libpq-int.h.
> As the file's header warns, including this file can lead to issues. Or am I missing something?

you're right about the warning in the header file. I am just thinking of
the maintenance of this in case new parameters are added in the
future. How do we ensure it reflects in the command output?

Maybe have an API in fe-connect.c that returns a list of all
pstatus->name and then for each value call PQParameterStatus?

But this patch still needs agreement on the high level points discussed
earlier.

Regards,

Sami



Commits

  1. psql: Change new \conninfo to use SSL instead of TLS

  2. Change \conninfo to use tabular format

  3. Update extension lookup routines to use the syscache

  4. Improve COPY TO performance when server and client encodings match

  5. doc: Remove superfluous bracket in synopsis

  6. Remove psql support for server versions preceding 9.2.