Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id E3A319FC0DF for ; Thu, 7 Jun 2007 19:08:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 42933-09 for ; Thu, 7 Jun 2007 19:08:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 920459FC0AD for ; Thu, 7 Jun 2007 19:08:24 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l57M8Kfe029829; Thu, 7 Jun 2007 18:08:20 -0400 (EDT) To: Steve Crawford cc: Michael Glaesemann , Scott Marlowe , "Campbell, Lance" , pgsql-sql@postgresql.org Subject: Re: subtract a day from the NOW function In-reply-to: <46687395.80707@pinpointresearch.com> References: <9938A77A-6E63-413D-8AC9-7CB741D075E6@seespotcode.net> <46684A70.4080903@g2switchworks.com> <4668555E.20003@pinpointresearch.com> <46687395.80707@pinpointresearch.com> Comments: In-reply-to Steve Crawford message dated "Thu, 07 Jun 2007 14:07:33 -0700" Date: Thu, 07 Jun 2007 18:08:20 -0400 Message-ID: <29828.1181254100@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/72 X-Sequence-Number: 28562 Steve Crawford writes: > But PG doesn't follow the same rules in subtracting timestamptz values > so operations involving timestamps and intervals are (sometimes) not > reversible: Yeah. timestamp_mi is performing a justify_hours call, which it should not, but removing that call changes a lot of the regression test outputs. So we've been afraid to change it. You can find more about that in the archives. regards, tom lane