Saving SRF context

Поиск
Список
Период
Сортировка
От Salvador Fandiño
Тема Saving SRF context
Дата
Msg-id 56E32849.3000006@gmail.com
обсуждение исходный текст
Ответы Re: Saving SRF context  (Salvador Fandiño <sfandino@gmail.com>)
Список pgsql-hackers
Hi,

I have implemented a SRF[*] that returns rows one by one (using 
ExprMultipleResult). But now I need to save somewhere some context 
information between calls pertaining to the same result set and I am 
unable to find a proper place for that.

I have seen that cfinfo->flinfo->fn_extra is available, but if I 
understand the mechanics of FmgrInfo correctly, that structure is not 
unique for call frame. It could be shared between several cfinfo 
structures and would be crushed on recursion (I plan to use SPI from my 
function).

So, is that right? should I build a stack there? is there any other 
place where to store context information relative to a SRF call frame?

Regards


* Code is here: https://github.com/salva/plswipl, I am trying to provide 
a procedural language using SWI-Prolog.



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Change error code for hstore syntax error
Следующее
От: Vitaly Burovoy
Дата:
Сообщение: Re: [PATH] Correct negative/zero year in to_date/to_timestamp