Re: Psql meta-command conninfo+

From: Sami Imseih <samimseih(at)gmail(dot)com>
To: Hunaid Sohail <hunaidpgml(at)gmail(dot)com>
Cc: Maiquel Grassi <grassi(at)hotmail(dot)com(dot)br>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, "Imseih (AWS), Sami" <simseih(at)amazon(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>, Erik Wienhold <ewie(at)ewie(dot)name>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Subject: Re: Psql meta-command conninfo+
Date: 2025-01-09 16:56:36
Message-ID: CAA5RZ0t5RD9ESKFPVfzpEFeC89iR8qVNmOL_Ensa0=9uEjo0vA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-01-09 17:01:55 Re: Adjusting hash join memory limit to handle batch explosion
Previous Message Regina Obe 2025-01-09 16:35:18 RE: Exporting float_to_shortest_decimal_buf(n) with Postgres 17 on Windows