From: Tom Lane <tgl@sss.pgh.pa.us>
To: Qingqing Zhou <zhouqq.postgres@gmail.com>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Fix incorrect matching of subexpressions in outer-join plan node
Date: Mon, 06 Apr 2015 19:22:19 -0400
Message-ID: <22812.1428362539@sss.pgh.pa.us> (raw)
In-Reply-To: <CAJjS0u35dOY_xG6z_Yb=X5+qRGAGtsyWUMt8F_DhhN3h5R1Dvg@mail.gmail.com>
References: <E1YeXuw-0004uD-T1@gemulon.postgresql.org>
<CAJjS0u35dOY_xG6z_Yb=X5+qRGAGtsyWUMt8F_DhhN3h5R1Dvg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Qingqing Zhou <zhouqq.postgres@gmail.com> writes:
> On Sat, Apr 4, 2015 at 4:55 PM, Tom Lane <tgl@sss.pgh.pa.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
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, zhouqq.postgres@gmail.com
Subject: Re: pgsql: Fix incorrect matching of subexpressions in outer-join plan node
In-Reply-To: <22812.1428362539@sss.pgh.pa.us>
References: <E1YeXuw-0004uD-T1@gemulon.postgresql.org> <CAJjS0u35dOY_xG6z_Yb=X5+qRGAGtsyWUMt8F_DhhN3h5R1Dvg@mail.gmail.com> <22812.1428362539@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox