pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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: Fri, 24 Apr 2015 13:30:49 -0400
Message-ID: <29122.1429896649@sss.pgh.pa.us> (raw)
In-Reply-To: <CAJjS0u1R+g8LdioAqg=b1P4++NbdCdTpBCoJsqZnWdMW_eGEHQ@mail.gmail.com>
References: <E1YeXuw-0004uD-T1@gemulon.postgresql.org>
	<CAJjS0u35dOY_xG6z_Yb=X5+qRGAGtsyWUMt8F_DhhN3h5R1Dvg@mail.gmail.com>
	<22812.1428362539@sss.pgh.pa.us>
	<CAJjS0u1R+g8LdioAqg=b1P4++NbdCdTpBCoJsqZnWdMW_eGEHQ@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

[ catching up on email post-vacation ]

Qingqing Zhou <zhouqq.postgres@gmail.com> writes:
> On Mon, Apr 6, 2015 at 4:22 PM, Tom Lane <tgl@sss.pgh.pa.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.

The reason we don't store those in the expression tree is that changing
those properties (eg with CREATE OR REPLACE FUNCTION) would break stored
views referencing the function.  It's okay to store resulttype and retset
because we disallow changing the output type (including set-ness) of a
function; but we don't want to disallow changing strictness for instance.

			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



view thread (11+ messages)  latest in thread

Message-ID: <29122.1429896649@sss.pgh.pa.us>
Permalink:  ../29122.1429896649@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29122.1429896649@sss.pgh.pa.us

 · 

reply

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: <29122.1429896649@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> <CAJjS0u1R+g8LdioAqg=b1P4++NbdCdTpBCoJsqZnWdMW_eGEHQ@mail.gmail.com> <29122.1429896649@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