Re: BUG #17957: psql-16beta1 \df+ does not show the function body

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: bzm(at)2bz(dot)de, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17957: psql-16beta1 \df+ does not show the function body
Date: 2023-06-01 19:23:12
Message-ID: ZHjwIHz/26HITdUC@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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(at)2bz(dot)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 <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2023-06-01 22:18:09 Re: BUG #17957: psql-16beta1 \df+ does not show the function body
Previous Message PG Bug reporting form 2023-06-01 19:11:24 BUG #17958: There was a error message while installing postgreSQL15 or 14 .