Re: Psql meta-command conninfo+

From: Erik Wienhold <ewie(at)ewie(dot)name>
To: Nathan Bossart <nathandbossart(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>
Subject: Re: Psql meta-command conninfo+
Date: 2024-02-06 19:10:54
Message-ID: aevq2dxmw2xm2rc3nh2wdcozunipco447mf4rpm7efvqvz4wk2@mo3zmf2ulbzu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2024-02-06 19:19 +0100, Nathan Bossart wrote:
> On Tue, Feb 06, 2024 at 05:27:01PM +0000, Maiquel Grassi wrote:
> > postgres=# \conninfo+
> > Current Connection Information
> > Attribute | Value
> > ----------------+----------------
> > Database | postgres
> > User | postgres
> > Server Version | 16.1
> > Server Address | 192.168.0.5/32
> > Server Port | 5433
> > Client Address | 192.168.0.5/32
> > Client Port | 52716
> > Session PID | 21624
> > (8 rows)
>
> My first reaction is that this should instead return a single row with the
> same set of columns for any connection type (the not-applicable ones would
> just be set to NULL). That would match the other meta-commands like \l and
> \du, and you could still get an expanded display with \x if needed. Also,
> I think it would simplify the code a bit.

+1 for a single-row result and triggering expanded display with \x for
consistency with other commands.

--
Erik

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2024-02-06 19:18:00 Re: Remove Start* macros from postmaster.c to ease understanding of code
Previous Message Laurenz Albe 2024-02-06 19:01:45 Re: Set log_lock_waits=on by default