Re: RowDescription for a function does not include table OID

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: RowDescription for a function does not include table OID
Дата
Msg-id CAKFQuwY76Jc=6JJOPzAt98RLuGCgCdNnS6syB0T4hF6iA=+uoQ@mail.gmail.com
обсуждение исходный текст
Ответ на RowDescription for a function does not include table OID  (Maxwell Dreytser <Maxwell.Dreytser@assistek.com>)
Ответы Re: RowDescription for a function does not include table OID
Список pgsql-general
On Fri, Jun 21, 2024 at 7:42 AM Maxwell Dreytser <Maxwell.Dreytser@assistek.com> wrote:
I am working on a meta-programming use-case where I need to scrape some detailed information about the results of a function that "RETURNS TABLE (LIKE physical_table)"

Yes, but the bug is yours.  The definition you want is:  RETURNS SETOF physical_table (not tested though)

What you did was produce a one-column table whose column type is a composite (and whose name is like - what with case-folding of unquoted identifiers).  Since that table doesn't exist anywhere in the catalogs it has no TableOID.

David J.

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

Предыдущее
От: Maxwell Dreytser
Дата:
Сообщение: RowDescription for a function does not include table OID
Следующее
От: Maxwell Dreytser
Дата:
Сообщение: Re: RowDescription for a function does not include table OID