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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: INFORMATION_SCHEMA.routines column routine_definition does not show the source
Дата
Msg-id 134216.1635957998@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: INFORMATION_SCHEMA.routines column routine_definition does not show the source  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: INFORMATION_SCHEMA.routines column routine_definition does not show the source  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
"David G. Johnston" <david.g.johnston@gmail.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.

            regards, tom lane



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: BUG #17257: (auto)vacuum hangs within lazy_scan_prune()
Следующее
От: Ian Campbell
Дата:
Сообщение: range_agg() missing support for multirange inputs