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-07 00:11:46
Message-ID: CAJjS0u1R+g8LdioAqg=b1P4++NbdCdTpBCoJsqZnWdMW_eGEHQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Mon, Apr 6, 2015 at 4:22 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 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.
>

Looks like not only contain_nonstrict_functions() is expensive, but
other contain_xxx family members.

In FuncExpr structure, for example, we already cached values like
retset, resulttype, but why not volatile and isstrict? In this way, we
avoid cache lookup every time. So as OpExpr etc.

Regards,
Qingqing

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2015-04-07 18:05:44 pgsql: Fix spelling of author's name
Previous Message Tom Lane 2015-04-06 23:22:19 Re: pgsql: Fix incorrect matching of subexpressions in outer-join plan node