Ivan Sergio Borgonovo wrote:
> But then... why do we have all that logic to save the function
> context if anyway it is more convenient to process everything in one
> run?
> It's a pain to save the context just to save a pointer inside a
> structure, it would be more convenient to just process all the
> structure and return it as a Tuplestore in one pass.
When the set-returning-function feature was written originally, years
ago, the tuple at a time mode did really work tuple at a time. But it
had issues and was axed out of the patch before it was committed, to
keep it simple. The idea was to revisit it at some point, but it hasn't
bothered anyone enough to fix it. It's basically "not implemented yet".
-- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com