Re: pgsql: Fix incorrect matching of subexpressions in outer-join plan node

From: Qingqing Zhou <zhouqq(dot)postgres(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix incorrect matching of subexpressions in outer-join plan node
Date: 2015-04-06 21:43:32
Message-ID: CAJjS0u35dOY_xG6z_Yb=X5+qRGAGtsyWUMt8F_DhhN3h5R1Dvg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Sat, Apr 4, 2015 at 4:55 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> planner redesign and not at all back-patchable. For the moment, just hack
> set_join_references so that it will not match any non-Var expressions
> coming from nullable inputs to expressions that came from above the join.
> (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?

Thanks,
Qingqing

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2015-04-06 23:22:19 Re: pgsql: Fix incorrect matching of subexpressions in outer-join plan node
Previous Message Alvaro Herrera 2015-04-06 14:43:46 pgsql: pg_event_trigger_dropped_objects: add is_temp column