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 1rY2AV-00Dxxe-0B for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Feb 2024 11:02:12 +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 1rY2AU-00GvAT-28 for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Feb 2024 11:02:10 +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 1rY2AT-00Gv62-LU for pgsql-hackers@lists.postgresql.org; Thu, 08 Feb 2024 11:02:09 +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 1rY2AN-00674w-Om for pgsql-hackers@postgresql.org; Thu, 08 Feb 2024 11:02:09 +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=1707390124; x=1738926124; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=paQZSpv1mR5sLW/6StSENdQ0AkABZ/Of3JpnK5ZdwAI=; b=mkWPPzga8yC3UIUll4kPaIZQ4xn8QzMZiMtH068W/WEdSmzNMRbEgtjj OOsrsdw7AbtWWm4Gzf2pT98/SwrElqkf+iAEKYP+4DrDdbcRXFdLqBUvt jfqsjc9A7JV8TgQgAWRXiw/dH/SLygtH6OgUIzyeXfnJo7F+TstTXSkSj eNDK+9m/ENON6Vu7iohCv0fOXCkjtcumFVXlREqbh964g8JhD6NqAhZpJ 3Zl27x2xtxR+raIWXICSyCW6naLTvRrkmIhOxBZs1T1p9CbZxYUqF1Kq4 kLsXo0ipkIH0VJHdXjRuT1V7tOhQJQoFdKs9003Fqty0FqDSyy0FNmEGN w==; X-CSE-ConnectionGUID: s421QsBeRbyuJp9N/5Snjg== X-CSE-MsgGUID: re+Hd22aTx6nGCYdAItbYw== X-IronPort-AV: E=Sophos;i="6.05,253,1701126000"; d="scan'208";a="315173709" Received: from secmail.uni-muenster.de ([128.176.118.4]) by UDCM-RELAY1.UNI-MUENSTER.DE with ESMTP; 08 Feb 2024 12:02:00 +0100 Received: from [192.168.178.27] (dynamic-078-049-162-196.78.49.pool.telefonica.de [78.49.162.196]) by SECMAIL.UNI-MUENSTER.DE (Postfix) with ESMTPSA id 2828E20ADF19; Thu, 8 Feb 2024 12:01:57 +0100 (CET) Message-ID: <47dcfd6f-d1d8-4a13-9bc5-b43ee9bd534f@uni-muenster.de> Date: Thu, 8 Feb 2024 12:01:55 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Psql meta-command conninfo+ To: Maiquel Grassi , Pavel Luzanov , Nathan Bossart Cc: Erik Wienhold , "pgsql-hackers@postgresql.org" References: <20240206181919.GA3853632@nathanxps13> <20240206210605.GA3903769@nathanxps13> <20240206211205.GA3903996@nathanxps13> <20240206215022.GA3452@nathanxps13> <852cabef-f596-4826-9a54-d3f75d9a6cc8@postgrespro.ru> Content-Language: en-US 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 Hi Maiquel On 07.02.24 21:13, Maiquel Grassi wrote: > > I believe in v7 patch we have a quite substantial meta-command feature. > > Thanks for implementing this. I find it very handy. I was just wondering if a "permission denied" error for non-superusers is the best choice for "\conninfo+": postgres=> \conninfo+ ERROR:  permission denied to examine "unix_socket_directories" DETAIL:  Only roles with privileges of the "pg_read_all_settings" role may examine this parameter. .. since it is not the case with "\conninfo": postgres=> \conninfo You are connected to database "postgres" as user "jim" via socket in "/tmp" at port "5432". Perhaps excluding the column from the result set or returning NULL in the affected columns would be less confusing? There are also some indentation issues in your patch: /home/jim/Downloads/v7-0001-psql-meta-command-conninfo-plus.patch:142: indent with spaces.     PGresult   *res; /home/jim/Downloads/v7-0001-psql-meta-command-conninfo-plus.patch:143: indent with spaces.     PQExpBufferData buf; /home/jim/Downloads/v7-0001-psql-meta-command-conninfo-plus.patch:144: indent with spaces.     printQueryOpt myopt = pset.popt; /home/jim/Downloads/v7-0001-psql-meta-command-conninfo-plus.patch:146: indent with spaces.     initPQExpBuffer(&buf); /home/jim/Downloads/v7-0001-psql-meta-command-conninfo-plus.patch:148: indent with spaces.     printfPQExpBuffer(&buf, warning: squelched 34 whitespace errors warning: 39 lines add whitespace errors. Looking forward to see the documentation and tests! -- Jim