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

From Qingqing Zhou
Subject Re: pgsql: Fix incorrect matching of subexpressions in outer-join plan node
Date
Msg-id CAJjS0u35dOY_xG6z_Yb=X5+qRGAGtsyWUMt8F_DhhN3h5R1Dvg@mail.gmail.com
Whole thread Raw
In response to pgsql: Fix incorrect matching of subexpressions in outer-join plan node  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql: Fix incorrect matching of subexpressions in outer-join plan node  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
On Sat, Apr 4, 2015 at 4:55 PM, Tom Lane <tgl@sss.pgh.pa.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


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: pg_event_trigger_dropped_objects: add is_temp column
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Fix incorrect matching of subexpressions in outer-join plan node