From: Christoph Moench-Tegeder <cmt@burggraben.net>
To: Dominique Devienne <ddevienne@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Who am I? Where am I connected?
Date: Wed, 18 May 2022 12:32:50 +0200
Message-ID: <YoTLUsgOC0HV8LsE@elch.exwg.net> (raw)
In-Reply-To: <CAFCRh-_BSW8VRPPQU6OrKmLZmk1+-0GvbBObgkMmqWf2_YqMkQ@mail.gmail.com>
References: <CAFCRh-_BSW8VRPPQU6OrKmLZmk1+-0GvbBObgkMmqWf2_YqMkQ@mail.gmail.com>
## Dominique Devienne (ddevienne@gmail.com):
> Once connected, can I find out all aspects of the connection string?
\conninfo in psql (pro tip: \? actually helps), "Connection Status
Functions" https://www.postgresql.org/docs/current/libpq-status.html
in libpq; and in a pinch you could find your connection in
pg_stat_activity (pid = pg_backend_pid()) plus some assorted queries
for other details. You cannot get actual secrets like your private
ssl key or your password (the server most likely doesn't have that,
and the client assumes that you have it).
Regards,
Christoph
--
Spare Space
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: cmt@burggraben.net, ddevienne@gmail.com
Subject: Re: Who am I? Where am I connected?
In-Reply-To: <YoTLUsgOC0HV8LsE@elch.exwg.net>
References: <CAFCRh-_BSW8VRPPQU6OrKmLZmk1+-0GvbBObgkMmqWf2_YqMkQ@mail.gmail.com> <YoTLUsgOC0HV8LsE@elch.exwg.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox