From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Erki Eessaar <erki(dot)eessaar(at)taltech(dot)ee>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, "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: | 2022-12-02 00:00:05 |
Message-ID: | CAKFQuwYT+HudtXnYTp_EvPvjd_a0516_PmmzJWX2SLQ+PLhqfg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Decided to ping this as I don't recall or see it getting patched and the
recent discussion regarding the prosrc field.
On Wed, Nov 3, 2021 at 9:46 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> > 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).
>
> pg_get_functiondef would produce more than we want, but it looks like
> pg_get_function_sqlbody() would do.
>
> BTW, while researching this I noted the header comment for
> pg_get_functiondef:
>
> * Note: if you change the output format of this function, be careful not
> * to break psql's rules (in \ef and \sf) for identifying the start of the
> * function body. To wit: the function body starts on a line that begins
> * with "AS ", and no preceding line will look like that.
>
> Needless to say, the SQL-function-body patch has ignored this advice
> totally. At the very least this comment needs to be adjusted, but
> I wonder if it's not telling us that \ef and/or \sf are broken.
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-12-02 01:28:39 | Re: INFORMATION_SCHEMA.routines column routine_definition does not show the source |
Previous Message | Tom Lane | 2022-12-01 22:37:39 | Re: Re: BUG #17704: Monitoring Queries trigger 'Signal 7: Bus Error' After Creating Hash Partitioned Table |