Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 68BB51546DD6 for ; Tue, 8 Nov 2011 19:29:11 -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 03251-01-6 for ; Tue, 8 Nov 2011 23:29:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from smtp.01.com (smtp.01.com [216.115.88.169]) by mail.postgresql.org (Postfix) with ESMTP id E3A381546DDB for ; Tue, 8 Nov 2011 19:29:04 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id A5CFFA082FB for ; Tue, 8 Nov 2011 17:29:04 -0600 (CST) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A1tYWhVulUQY for ; Tue, 8 Nov 2011 17:29:04 -0600 (CST) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 7DFC4A08299 for ; Tue, 8 Nov 2011 17:29:04 -0600 (CST) Received: from Sidney-Stratton.local (70-36-143-92.dsl.dynamic.sonic.net [70.36.143.92]) by smtp-out-2.01.com (Postfix) with ESMTPSA id 57818A082FC for ; Tue, 8 Nov 2011 17:29:04 -0600 (CST) Message-ID: <4EB9BB3F.6090504@agliodbs.com> Date: Tue, 08 Nov 2011 15:29:03 -0800 From: Josh Berkus Organization: PostgreSQL Experts Inc. User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: STRICT SQL functions never inline X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201111/118 X-Sequence-Number: 45629 Folks, After having some production issues, I did some testing and it seems that any SQL function declared STRICT will never inline. As a result, it won't work with either indexes (on the underlying predicate) or partitioning. This seems like a horrible gotcha for our users. At the very least I'd like to document it (in CREATE FUNCTION, presumably), but it would be better to fix it. Thoughts? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com