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

From Sami Imseih
Subject Re: Psql meta-command conninfo+
Date
Msg-id CAA5RZ0t5RD9ESKFPVfzpEFeC89iR8qVNmOL_Ensa0=9uEjo0vA@mail.gmail.com
Whole thread Raw
In response to Re: Psql meta-command conninfo+  (Hunaid Sohail <hunaidpgml@gmail.com>)
List 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



pgsql-hackers by date:

Previous
From: "Regina Obe"
Date:
Subject: RE: Exporting float_to_shortest_decimal_buf(n) with Postgres 17 on Windows
Next
From: Tomas Vondra
Date:
Subject: Re: Adjusting hash join memory limit to handle batch explosion