Re: functions returning sets - Mailing list pgsql-general

From Tom Lane
Subject Re: functions returning sets
Date
Msg-id 4567.1071785242@sss.pgh.pa.us
Whole thread Raw
In response to Re: functions returning sets  (Joe Conway <mail@joeconway.com>)
Responses Re: functions returning sets
List pgsql-general
Joe Conway <mail@joeconway.com> writes:
> Any comment on the patch?

It seems like a bad idea to change the contents of the SRF_XXX() macros
for 7.4.1; if we do that, any existing already-compiled-for-7.4 user
SRFs will be broken, and there's no easy way to catch the problem.
We don't normally require people to recompile user-defined functions for
dot releases anyway.

I would suggest leaving end_MultiFuncCall() with its existing API,
and adding a separate shutdown callback function that is registered
during init_MultiFuncCall and deregistered by end_MultiFuncCall.
(This should be workable without API change since init_MultiFuncCall
can get to the econtext via fcinfo->resultinfo.)

You may not even need to add any fields to FuncCallContext --- consider
passing the fcinfo pointer to the callback, rather than passing the
FuncCallContext pointer.

            regards, tom lane

pgsql-general by date:

Previous
From: Melanie Bergeron
Date:
Subject: automatic verifications
Next
From: Tom Lane
Date:
Subject: Re: functions returning sets