Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1raDZV-008fNj-8v for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Feb 2024 11:37:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1raDZT-005loS-Vj for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Feb 2024 11:36:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1raDZT-005loK-K9 for pgsql-hackers@lists.postgresql.org; Wed, 14 Feb 2024 11:36:59 +0000 Received: from udcm-wwu1.uni-muenster.de ([128.176.118.7]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1raDZQ-0079Bs-Ni for pgsql-hackers@postgresql.org; Wed, 14 Feb 2024 11:36:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uni-muenster.de; i=@uni-muenster.de; q=dns/txt; s=uniout; t=1707910617; x=1739446617; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=uAwrjWW1MBbTwNELs7C9EX2XjoMv1jsiocVgIrgmHf4=; b=mleYY5VS6dDxvwxEnYxCdxEjSAbEF0/SH9/5fYzPCPXHHV+dt4n2tMY2 EUTvSeQ9wb2abgqeLCGrJ8BNaTLUteYBArhE5JztFqH+Oyd5dW22zNvN3 KFCdsBjI3BSLPr1dBV1s7c1tySp4tgPvyLeSlas3zfbBWQmgFhEkNtzfR 4IXLYfpHzZw/EzbgbsjqeQxgSZeTE6Zgqm7bDQMWIkPicZUaDTZHl3Rh4 AMbF2ClH1Hx2F1F5uWmZew4onowQDyuo/KNxUAejRe7GSP24VFvJ0a2YO 6+AJFBt9sF4Oc8SvAd1peElg/ERjfaW+NIyPNRWc0wUBQy0Fdu7dPsZ8B g==; X-CSE-ConnectionGUID: nKKYb9/tR5GRX9YxyN0JqA== X-CSE-MsgGUID: Wg050AfDTCiTOtbbUjo4Uw== X-IronPort-AV: E=Sophos;i="6.06,159,1705359600"; d="scan'208";a="315948537" Received: from secmail.uni-muenster.de ([128.176.118.4]) by UDCM-RELAY1.UNI-MUENSTER.DE with ESMTP; 14 Feb 2024 12:36:54 +0100 Received: from [192.168.178.27] (dynamic-002-244-114-111.2.244.pool.telefonica.de [2.244.114.111]) by SECMAIL.UNI-MUENSTER.DE (Postfix) with ESMTPSA id 74B2820ADF19; Wed, 14 Feb 2024 12:36:51 +0100 (CET) Message-ID: <49635a5b-3d32-4f05-8ce4-c55c70181888@uni-muenster.de> Date: Wed, 14 Feb 2024 12:36:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Psql meta-command conninfo+ Content-Language: en-US To: Maiquel Grassi , Pavel Luzanov , Nathan Bossart Cc: Erik Wienhold , "pgsql-hackers@postgresql.org" References: <20240206210605.GA3903769@nathanxps13> <20240206211205.GA3903996@nathanxps13> <20240206215022.GA3452@nathanxps13> <852cabef-f596-4826-9a54-d3f75d9a6cc8@postgrespro.ru> <49edac91-d47f-4cac-ae12-d51cabbd87c9@postgrespro.ru> From: Jim Jones In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12.02.24 15:16, Maiquel Grassi wrote: > > (v14) > > v14 applies cleanly and the SSL info is now shown as previously suggested. Here is a more comprehensive test: $ /usr/local/postgres-dev/bin/psql -x "\     host=server.uni-muenster.de     hostaddr=172.19.42.1     user=jim dbname=postgres     sslrootcert=server-certificates/server.crt     sslcert=jim-certificates/jim.crt     sslkey=jim-certificates/jim.key"      psql (17devel) SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off) Type "help" for help. postgres=# SET ROLE foo; SET postgres=> \conninfo+ Current Connection Information -[ RECORD 1 ]------+--------------------------------------------------------------------------------------------------------------------------- Database           | postgres Authenticated User | jim System User        | cert:emailAddress=jim@uni-muenster.de,CN=jim,OU=WWU IT,O=Universitaet Muenster,L=Muenster,ST=Nordrhein-Westfalen,C=DE Current User       | foo Session User       | jim Backend PID        | 278294 Server Address     | 172.19.42.1 Server Port        | 5432 Client Address     | 192.168.178.27 Client Port        | 54948 Socket Directory   | Host               | server.uni-muenster.de Encryption         | SSL Protocol           | TLSv1.3 Cipher             | TLS_AES_256_GCM_SHA384 Compression        | off postgres=> \conninfo You are connected to database "postgres" as user "jim" on host "server.uni-muenster.de" (address "127.0.0.1") at port "5432". SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off) A little odd is that "Server Address" of \conninfo+ differs from "address" of \conninfo... I think the documentation could add a little more info than just this: > When no + is specified, it simply prints a textual description of a few connection options. When + is given, more complete information is displayed as a table. Perhaps briefly mentioning the returned columns or simply listing them would be IMHO a nice addition. For some users the semantics of "Authenticated User", "System User", "Current User" and "Session User" can be a little confusing. And yes, I realize the current documentation of \conninfo is already a little vague :). Thanks for working on this -- Jim