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 1q4ntG-0007ot-Sd for pgsql-bugs@arkaria.postgresql.org; Thu, 01 Jun 2023 19:23:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q4ntF-0000g4-LI for pgsql-bugs@arkaria.postgresql.org; Thu, 01 Jun 2023 19:23:17 +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 1q4ntF-0000fv-D2 for pgsql-bugs@lists.postgresql.org; Thu, 01 Jun 2023 19:23:17 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q4ntB-003Y5s-TH for pgsql-bugs@lists.postgresql.org; Thu, 01 Jun 2023 19:23:16 +0000 Received: from bruce by momjian.us with local (Exim 4.94.2) (envelope-from ) id 1q4ntA-005VK6-1D; Thu, 01 Jun 2023 15:23:12 -0400 Date: Thu, 1 Jun 2023 15:23:12 -0400 From: Bruce Momjian To: bzm@2bz.de, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17957: psql-16beta1 \df+ does not show the function body Message-ID: References: <17957-e1db8b1c15af444a@postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17957-e1db8b1c15af444a@postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jun 1, 2023 at 05:57:19PM +0000, PG Bug reporting form wrote: > The following bug has been logged on the website: > > Bug reference: 17957 > Logged by: Boris Z > Email address: bzm@2bz.de > PostgreSQL version: 16beta1 > Operating system: OSX, Linux > Description: > > Hi, > > The release notes do not mention \df+. > https://www.postgresql.org/docs/16/release-16.html#RELEASE-16-PSQL > > for testing I used this function, but any user function will do. > > CREATE OR REPLACE FUNCTION test_function() > RETURNS bigint > AS $$ > SELECT 1; > $$ LANGUAGE sql > STABLE > PARALLEL SAFE; > > When using psql (16beta1) > =# \df+ test_function > -[ RECORD 1 ]-------+-------------- > Schema | public > Name | test_function > Result data type | bigint > Argument data types | > Type | func > Volatility | stable > Parallel | safe > Owner | bz > Security | invoker > Access privileges | > Language | sql > Internal name | > Description | > > using psql-15.3 it works as expected > =# \df+ test_function > -[ RECORD 1 ]-------+-------------- > Schema | public > Name | test_function > Result data type | bigint > Argument data types | > Type | func > Volatility | stable > Parallel | safe > Owner | bz > Security | invoker > Access privileges | > Language | sql > Source code | + > | SELECT 1;+ > | > Description | We had this commit in PG 16: Author: Tom Lane 2023-03-02 [3dfae91f7] Show "internal name" not "source code" in psql's \df+ co Show "internal name" not "source code" in psql's \df+ command. Our previous habit of showing the full function body is really pretty unfriendly for tabular viewing of functions, and now that we have \sf and \ef commands there seems no good reason why \df+ has to do it. It still seems to make sense to show prosrc for internal and C-language functions, since in those cases prosrc is just the C function name; but then let's rename the column to "Internal name" which is a more accurate descriptor. Isaac Morland Discussion: https://postgr.es/m/CAMsGm5eqKc6J1=Lwn=ZONG=6ZDYWRQ4cgZQLqMuZGB1aVt_JBg@mail.gmail.com I didn't think anyone would mind the change so I didn't document it in the release notes --- should I? -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.