Re: Remove source code display from \df+? - Mailing list pgsql-hackers

From Isaac Morland
Subject Re: Remove source code display from \df+?
Date
Msg-id CAMsGm5fUOR8eZsHWn+EYDMWaaDbYNcOY7PRULegtL_E9qV=-TA@mail.gmail.com
Whole thread Raw
In response to Re: Remove source code display from \df+?  (Isaac Morland <isaac.morland@gmail.com>)
Responses Re: Remove source code display from \df+?
List pgsql-hackers
On Thu, 12 Jan 2023 at 12:06, Isaac Morland <isaac.morland@gmail.com> wrote:

Thanks everybody. So based on the latest discussion I will:

1) rename the column from “Source code” to “Internal name”; and
2) change the contents to NULL except when the language (identified by oid) is INTERNAL or C.

Patch forthcoming, I hope.

I've attached a patch for this. It turns out to simplify the existing code in one way because the recently added call to pg_get_function_sqlbody() is no longer needed since it applies only to SQL functions, which will now display as a blank column.

I implemented the change and was surprised to see that no tests failed. Turns out that while there are several tests for \df, there were none for \df+. I added a couple, just using \df+ on some functions that appear to me to be present on plain vanilla Postgres.

I was initially concerned about translation support for the column heading, but it turns out that \dT+ already has a column with the exact same name so it appears we don’t need any new translations.

I welcome comments and feedback. Now to try to find something manageable to review.
Attachment

pgsql-hackers by date:

Previous
From: Ankit Kumar Pandey
Date:
Subject: [PATCH] Teach planner to further optimize sort in distinct
Next
From: Tomas Vondra
Date:
Subject: Re: Progress report of CREATE INDEX for nested partitioned tables