Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id BDEA91212266 for ; Tue, 8 Nov 2011 20:31:07 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 45947-01-5 for ; Wed, 9 Nov 2011 00:31:01 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 9E20E18C2EC6 for ; Tue, 8 Nov 2011 20:29:38 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id pA90TY53014183; Tue, 8 Nov 2011 19:29:34 -0500 (EST) To: Josh Berkus cc: pgsql-performance@postgresql.org Subject: Re: STRICT SQL functions never inline In-reply-to: <4EB9BB3F.6090504@agliodbs.com> References: <4EB9BB3F.6090504@agliodbs.com> Comments: In-reply-to Josh Berkus message dated "Tue, 08 Nov 2011 15:29:03 -0800" Date: Tue, 08 Nov 2011 19:29:34 -0500 Message-ID: <14182.1320798574@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-3.101 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-1.201 X-Spam-Level: X-Archive-Number: 201111/120 X-Sequence-Number: 45631 Josh Berkus 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