Re: Error: rows returned by function are not all of the same row type

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Error: rows returned by function are not all of the same row type
Дата
Msg-id 28764.1562251122@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Error: rows returned by function are not all of the same row type  (Andrey Sychev <andrey.sychev@cifrasoft.com>)
Ответы Re: Error: rows returned by function are not all of the same row type  (Andrey Sychev <andrey.sychev@cifrasoft.com>)
Список pgsql-general
Andrey Sychev <andrey.sychev@cifrasoft.com> writes:
> I have written C-language function that returns
> multiple composite rows.
> Generally function works as expected, but sometimes problem takes place.
> At  rough  guess  the  problem  occurs  when  number of returning rows
> relatively large (more than 100K - 1M).

I do not think it's valid to return from your function with the SPI
context still open.  Probably, it seems to accidentally sort of work
as long as you don't return enough rows to cause the outer query to
do anything interesting like spill to disk.

Probably you should re-code this to execute just once and return
a tuplestore.

            regards, tom lane



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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Why does jsonb_set() remove non-mentioned keys?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Expression of check constraint