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 1nrSrb-0005Nq-MW for pgsql-general@arkaria.postgresql.org; Wed, 18 May 2022 23:13:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nrSqb-0001qW-Cv for pgsql-general@arkaria.postgresql.org; Wed, 18 May 2022 23:12:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrSqb-0001qM-2d for pgsql-general@lists.postgresql.org; Wed, 18 May 2022 23:12:53 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrSqY-0002dl-LB for pgsql-general@lists.postgresql.org; Wed, 18 May 2022 23:12:52 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 24INCl5e063572; Wed, 18 May 2022 19:12:47 -0400 From: Tom Lane To: Dominique Devienne cc: "David G. Johnston" , "pgsql-generallists.postgresql.org" Subject: Re: Who am I? Where am I connected? In-reply-to: References: Comments: In-reply-to Dominique Devienne message dated "Wed, 18 May 2022 23:59:23 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <63570.1652915567.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 18 May 2022 19:12:47 -0400 Message-ID: <63571.1652915567@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Dominique Devienne writes: > AFAIK, it=E2=80=99s not psql that does this though, it=E2=80=99s libpq t= he official client > api. > And the fact libpq has no way to surface that info seems like an importa= nt > oversight. PQconninfo() will show you all the option values in use by a connection object. It's true that it's not very easy to tell where any given value came from, but I doubt it'd be worth an ABI break to add such info. (You could at least recognize values that match the hard-wired default or environment variable value.) regards, tom lane