pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: STRICT SQL functions never inline
Date: Tue, 08 Nov 2011 19:29:34 -0500
Message-ID: <14182.1320798574@sss.pgh.pa.us> (raw)
In-Reply-To: <4EB9BB3F.6090504@agliodbs.com>
References: <4EB9BB3F.6090504@agliodbs.com>

Josh Berkus <josh@agliodbs.com> writes:
> After having some production issues, I did some testing and it seems
> that any SQL function declared STRICT will never inline.

It won't unless the planner can prove that the resulting expression
behaves the same, ie, is also strict for *all* the parameters.  Which
in most cases isn't true, or at least is very difficult to prove.
This is not a bug.

			regards, tom lane



view thread (3+ messages)

Message-ID: <14182.1320798574@sss.pgh.pa.us>
Permalink:  ../14182.1320798574@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14182.1320798574@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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, josh@agliodbs.com
  Subject: Re: STRICT SQL functions never inline
  In-Reply-To: <14182.1320798574@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