Hi, On Tue, Sep 10, 2024 at 9:16 PM Alvaro Herrera <[email protected]> wrote:
> On 2024-Sep-10, Jim Jones wrote:
>
> > Is \conninfo+ no longer supposed to return the results in tabular form?
> > At least it wasn't the case till v28.
>
> I suspect the reason it's no longer a table is that it was previously a
> query (which is easily printed as a table by calling printQuery) and now
> it's just a client-side thing, and Hunaid didn't know how to handle that
> as a table. The good news is, it should be really easy to do
> printTableInit(), then a bunch of printTableAddHeader() and
> printTableAddCell(), end with printTable(). I think the tabular format
> is better for sure.
>
I have made the requested changes. Now output is returned in tabular form.
Indentation/whitespace issues are fixed.
$bin/psql --port=5430 postgres
postgres=# \conninfo+
You are connected to database "postgres" as user "hunaid" via socket in
"/tmp" at port "5430".
Connection Information
Parameter | Value
----------------------+--------
Protocol Version | 3
SSL Connection | no
GSSAPI Authenticated | no
Client Encoding | UTF8
Server Encoding | UTF8
Session User | hunaid
Backend PID | 121800
(7 rows)
Regards,
Hunaid Sohail
v32-0001-Add-psql-meta-command-conninfo.patch
Description: Binary data
