From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Qingqing Zhou <zhouqq(dot)postgres(at)gmail(dot)com> |
Cc: | pgsql-committers(at)postgresql(dot)org |
Subject: | Re: pgsql: Fix incorrect matching of subexpressions in outer-join plan node |
Date: | 2015-04-06 23:22:19 |
Message-ID: | 22812.1428362539@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Qingqing Zhou <zhouqq(dot)postgres(at)gmail(dot)com> writes:
> On Sat, Apr 4, 2015 at 4:55 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> (This is somewhat overkill, in that a strict expression could still be
>> matched, but it doesn't seem worth the effort to check that.)
> Just curious, checking an expression strictness is convenient in
> build_tlist_index() like this:
> TargetEntry *tle = (TargetEntry *) lfirst(l);
> + if (contain_nonstrict_functions((Node *)tle))
> + *hasnonstrict = true;
> +
> And this will almost avoid the overkill at once. Why not do this?
Because it's expensive (a syscache lookup per function or operator).
And that test alone would be insufficient anyway: you'd also have to
check that there was an appropriate Var in the expression, cf the
comment for contain_nonstrict_functions.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Qingqing Zhou | 2015-04-07 00:11:46 | Re: pgsql: Fix incorrect matching of subexpressions in outer-join plan node |
Previous Message | Qingqing Zhou | 2015-04-06 21:43:32 | Re: pgsql: Fix incorrect matching of subexpressions in outer-join plan node |