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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Erki Eessaar <erki(dot)eessaar(at)taltech(dot)ee>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: INFORMATION_SCHEMA.routines column routine_definition does not show the source
Date: 2021-11-03 15:21:34
Message-ID: CAKFQuwZaihWCaR4T=4Ov9ufk7jipRbBBtEDon61XMYOU6qkhxQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Nov 3, 2021 at 7:49 AM Erki Eessaar <erki(dot)eessaar(at)taltech(dot)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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Erki Eessaar 2021-11-03 15:44:50 pg_get_functiondef and aggregate functions
Previous Message Erki Eessaar 2021-11-03 14:42:16 INFORMATION_SCHEMA.routines column routine_definition does not show the source