Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 807E71337BE9 for ; Wed, 20 Apr 2011 21:49:03 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 52465-01 for ; Thu, 21 Apr 2011 00:48:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id D00D1133798E for ; Wed, 20 Apr 2011 21:48:55 -0300 (ADT) 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 p3L0mneP026140; Wed, 20 Apr 2011 20:48:49 -0400 (EDT) To: Josh Berkus cc: pgsql-performance@postgresql.org Subject: Re: Constraint exclusion can't process simple constant expressions? In-reply-to: <4DAF70FD.7000609@agliodbs.com> References: <4DAF70FD.7000609@agliodbs.com> Comments: In-reply-to Josh Berkus message dated "Wed, 20 Apr 2011 16:49:17 -0700" Date: Wed, 20 Apr 2011 20:48:49 -0400 Message-ID: <26139.1303346929@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/284 X-Sequence-Number: 43346 Josh Berkus writes: > I understand why now() is a problem for CE, but I'd expect that it could > at least handle a simple expression with immutable outputs. timestamptz + interval is not immutable --- in fact, the particular example you give (ts + '1 day') is certainly dependent on timezone setting. regards, tom lane