Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id C9A1F1337B83 for ; Wed, 20 Apr 2011 23:45:12 -0300 (ADT) 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 40265-10 for ; Thu, 21 Apr 2011 02:44:55 +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 2A55B1337B47 for ; Wed, 20 Apr 2011 23:44: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 p3L2io8S027887; Wed, 20 Apr 2011 22:44:50 -0400 (EDT) To: Josh Berkus cc: pgsql-performance@postgresql.org Subject: Re: Constraint exclusion can't process simple constant expressions? In-reply-to: <4DAF8F60.9050407@agliodbs.com> References: <4DAF70FD.7000609@agliodbs.com> <26139.1303346929@sss.pgh.pa.us> <4DAF8F60.9050407@agliodbs.com> Comments: In-reply-to Josh Berkus message dated "Wed, 20 Apr 2011 18:58:56 -0700" Date: Wed, 20 Apr 2011 22:44:50 -0400 Message-ID: <27886.1303353890@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/291 X-Sequence-Number: 43353 Josh Berkus writes: >> timestamptz + interval is not immutable --- in fact, the particular >> example you give (ts + '1 day') is certainly dependent on timezone >> setting. > Why not? Given that the time zone will be the same for both the > timestamptz and the interval, how would the result not be immutable? The reason it depends on the timezone is that the result varies if "plus one day" means crossing a DST boundary. regards, tom lane