Re: functions returning sets

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jeff Rogers <jrogers(at)findlaw(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: functions returning sets
Date: 2003-12-17 21:16:28
Message-ID: 3FE0C7AC.7090002@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Joe Conway <mail(at)joeconway(dot)com> writes:
>>Any guidance on the preferred fix?
>
> We cannot fix this by changing ExecScanSubPlan as you suggest.
> That would amount to saying that all plans have to be run to completion,
> which destroys LIMIT to name just one unpleasant consequence.

I suspected as much.

> There is a mechanism available for functions to arrange to get cleanup
> callbacks when a containing plan is shut down early --- see
> RegisterExprContextCallback and ShutdownExprContext. It looks like this
> is not used by the existing SRF support, but I suspect it should be.

OK -- I'll take a look.

> [ scratches head ... ] Right at the moment I don't see where
> ShutdownExprContext gets called during a ReScan operation. I'm quite
> sure it once was ... there may be another bug here ...
>

Thanks, I'll keep that in mind too.

Joe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message ezra epstein 2003-12-17 21:21:25 Triggers for FK on Views - can they be made deferrable?
Previous Message Larry Rosenman 2003-12-17 20:35:31 Re: bind-dlz with postgresql driver ...