Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrGzB-0006UD-Ii for pgsql-general@arkaria.postgresql.org; Wed, 18 May 2022 10:32:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nrGzA-0001pr-5M for pgsql-general@arkaria.postgresql.org; Wed, 18 May 2022 10:32:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrGz9-0001oa-Qu for pgsql-general@lists.postgresql.org; Wed, 18 May 2022 10:32:55 +0000 Received: from smtp.burggraben.net ([88.198.69.140]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrGz7-0003Ty-82 for pgsql-general@lists.postgresql.org; Wed, 18 May 2022 10:32:54 +0000 Received: from elch.exwg.net (elch.exwg.net [IPv6:2001:470:7120:1:127b:44ff:fe4f:148d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "elch.exwg.net", Issuer "R3" (not verified)) by smtp.burggraben.net (Postfix) with ESMTPS id 9A732C0031C; Wed, 18 May 2022 12:32:50 +0200 (CEST) Received: by elch.exwg.net (Postfix, from userid 1000) id 19F713AB09; Wed, 18 May 2022 12:32:50 +0200 (CEST) Date: Wed, 18 May 2022 12:32:50 +0200 From: Christoph Moench-Tegeder To: Dominique Devienne Cc: pgsql-general@lists.postgresql.org Subject: Re: Who am I? Where am I connected? Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.4 (2022-04-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ## 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