Re: Who am I? Where am I connected? - Mailing list pgsql-general

From Dominique Devienne
Subject Re: Who am I? Where am I connected?
Date
Msg-id CAFCRh-9D37RTFNAFm-r+trq63kpk_M4cWGQ5_oG0hM+9QHLe7Q@mail.gmail.com
Whole thread Raw
In response to Re: Who am I? Where am I connected?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Who am I? Where am I connected?
Re: Who am I? Where am I connected?
List pgsql-general


On Wed, May 18, 2022 at 5:43 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Wed, May 18, 2022 at 3:08 AM Dominique Devienne <ddevienne@gmail.com> wrote:
Once connected, can I find out all aspects of the connection string?
Or where they came from, like a pgpass.conf or service file?

How to get the host, port, db name once connected?
SHOW and pg_settings does not appear to be it, at first glance.


The server has no clue how the values sent to it came into existence - nor should it.

Whether and how any particular client might expose this kind of debugging information (or upgrade it to proper state info) is up to the client.  I do not know what options psql offers.

AFAIK, it’s not psql that does this though, it’s libpq the official client api.
And the fact libpq has no way to surface that info seems like an important oversight. 

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Reasons for not overwriting processed wal archives?
Next
From: Adrian Klaver
Date:
Subject: Re: Who am I? Where am I connected?