Re: INFORMATION_SCHEMA.routines column routine_definition does not show the source

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Erki Eessaar <erki.eessaar@taltech.ee>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2024-09-18T06:05:04Z
Lists: pgsql-bugs

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add some sanity checks in executor for query ID reporting

  2. Fix psql's \sf and \ef for new-style SQL functions.

On Tuesday, September 17, 2024, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> "David G. Johnston" <david.g.johnston@gmail.com> writes:
> > Ping again as a Reddit poster just pointed this out.
>
> Huh?  The patch you're replying to was committed two years ago.
>
>
The patch I’m replying to doesn’t fix the bug reported on this thread
though…which still exists.

https://github.com/postgres/postgres/blob/24f5205948093a96edf8213294b3d585ac3fe1fb/src/backend/catalog/information_schema.sql#L1593

             CASE WHEN pg_has_role(p.proowner, 'USAGE') THEN p.prosrc ELSE
null END
             AS character_data) AS routine_definition,

David J.