Re: BUG #1993: Adding/subtracting negative time intervals - Mailing list pgsql-bugs

From Klint Gore
Subject Re: BUG #1993: Adding/subtracting negative time intervals
Date
Msg-id 435D9CEA291.BE6BKG@129.180.47.120
Whole thread Raw
In response to Re: BUG #1993: Adding/subtracting negative time intervals  (Russell Smith <mr-russ@pws.com.au>)
Responses Re: BUG #1993: Adding/subtracting negative time intervals
Re: BUG #1993: Adding/subtracting negative time intervals
List pgsql-bugs
On Tue, 25 Oct 2005 08:51:59 +1000, Russell Smith <mr-russ@pws.com.au> wrote:
> Nicholas wrote:
> > postgres=# SELECT NOW()-interval '1 week';
> >            ?column?
> > -------------------------------
> >  2005-10-17 08:52:37.355219+10
> > (1 row)
> >
> > postgres=# SELECT NOW()-interval '-1 week';
> >            ?column?
> > -------------------------------
> >  2005-10-31 08:52:39.021583+11
>
> Looks to mee like Daylight Savings has conveniently started.

But the elapsed time for those results is only 6 days, 23 hours.

That's changed since v7.4.7

template1=# select now();
              now
-------------------------------
 2005-10-25 12:40:22.699545+10
(1 row)

template1=# select now() + '1 week'::interval;
           ?column?
------------------------------
 2005-11-01 13:40:33.85492+11
(1 row)

template1=# select now() - '-1 week'::interval;
           ?column?
-------------------------------
 2005-11-01 13:40:46.707656+11
(1 row)

template1=# select version();
                                                 version

--------------------------------------------------------------------------------
-------------------------
 PostgreSQL 7.4.7 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.2 20030222
 (Red Hat Linux 3.2.2-5)
(1 row)


+---------------------------------------+-----------------+
: Klint Gore                            : "Non rhyming    :
: EMail   : kg@kgb.une.edu.au           :  slang - the    :
: Snail   : A.B.R.I.                    :  possibilities  :
: Mail      University of New England   :  are useless"   :
:           Armidale NSW 2351 Australia :     L.J.J.      :
: Fax     : +61 2 6772 5376             :                 :
+---------------------------------------+-----------------+

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1996: DISTINCT fails with national character varying
Next
From: Tom Lane
Date:
Subject: Re: BUG #1993: Adding/subtracting negative time intervals