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

From Christoph Moench-Tegeder
Subject Re: Who am I? Where am I connected?
Date
Msg-id YoTLUsgOC0HV8LsE@elch.exwg.net
Whole thread Raw
In response to Who am I? Where am I connected?  (Dominique Devienne <ddevienne@gmail.com>)
List pgsql-general
## 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



pgsql-general by date:

Previous
From: Ganesh Korde
Date:
Subject: Re: Who am I? Where am I connected?
Next
From: Wiwwo Staff
Date:
Subject: show primary_conninfo unchanged after promotion?