Re: revised patch for PL/PgSQL table functions

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: revised patch for PL/PgSQL table functions
Дата
Msg-id 87k7m6w3vw.fsf@mailbox.samurai.com
обсуждение исходный текст
Ответ на Re: revised patch for PL/PgSQL table functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: revised patch for PL/PgSQL table functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Tom Lane <tgl@sss.pgh.pa.us> writes:
> Actually, it does that already: exec_stmt_return_next relies on the
> expectedDesc to check the value being output in all cases.  So for a
> SETOF RECORD function, the additional work required might be as simple
> as just opening up the check in plpgsql_compile to allow RECORD return
> type.  For the non-SETOF case (table function returning a single tuple),
> I think exec_stmt_return would work okay as long as plpgsql_compile had
> set fn_retistuple true for RECORD.

Okay, here's a patch that implements this -- no additional changes to
PL/PgSQL were needed, as far as I could tell. I've added some
regression tests that cover this new functionality and they seem to
work as expected.

Unless anyone sees a problem, please apply.

Cheers,

Neil

--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC

Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: reindex in tab completion
Следующее
От: Neil Conway
Дата:
Сообщение: CREATE TABLE docs fix