Re: Support for grabbing multiple consecutive values with nextval()
| От | Tom Lane |
|---|---|
| Тема | Re: Support for grabbing multiple consecutive values with nextval() |
| Дата | |
| Msg-id | 3437952.1659026830@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Support for grabbing multiple consecutive values with nextval() (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Support for grabbing multiple consecutive values with nextval()
|
| Список | pgsql-hackers |
I wrote:
> I've got no strong opinion about this bit:
>> As suggested upthread, returning a resultset would probably be better.
Actually, on further thought, I do like the resultset idea, because
it'd remove the need for a complex rewrite of nextval_internal.
Assuming the SRF is written in ValuePerCall style, each iteration
can just call nextval_internal with no modifications needed in that
function. There'll be a CHECK_FOR_INTERRUPTS somewhere in the
query-level loop, or at least it's not nextval's fault if there's not.
The situation is then no different from generate_series with a large
loop count, or any other query that can generate lots of data.
Of course, this does imply a lot more cycles expended per generated value
--- but most of that is inherent in the larger amount of data being
handed back.
regards, tom lane
В списке pgsql-hackers по дате отправления: