Re: INFORMATION_SCHEMA.routines column routine_definition does not show the source - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: INFORMATION_SCHEMA.routines column routine_definition does not show the source
Date
Msg-id CAKFQuwZaihWCaR4T=4Ov9ufk7jipRbBBtEDon61XMYOU6qkhxQ@mail.gmail.com
Whole thread Raw
In response to INFORMATION_SCHEMA.routines column routine_definition does not show the source  (Erki Eessaar <erki.eessaar@taltech.ee>)
Responses Re: INFORMATION_SCHEMA.routines column routine_definition does not show the source
List pgsql-bugs
On Wed, Nov 3, 2021 at 7:49 AM Erki Eessaar <erki.eessaar@taltech.ee> wrote:
Unfortunately the bodies of such routines are not visible in the column routine_definition of the view INFORMATION_SCHEMA.routines. In case of these routines the field contains the empty string instead of the routine body.

Thanks for the report!

The information schema query consults pg_proc.prosrc directly instead of calling pg_get_functiondef(...) (which didn't exist when the original query was written, and hasn't been wrong until now).

David J.

pgsql-bugs by date:

Previous
From: Erki Eessaar
Date:
Subject: INFORMATION_SCHEMA.routines column routine_definition does not show the source
Next
From: Erki Eessaar
Date:
Subject: pg_get_functiondef and aggregate functions