Re: pgsql: Add 'day' field to INTERVAL so 1 day interval - Mailing list pgsql-committers

From Bruce Momjian
Subject Re: pgsql: Add 'day' field to INTERVAL so 1 day interval
Date
Msg-id 200507201721.j6KHLjT14715@candle.pha.pa.us
Whole thread Raw
In response to pgsql: Add 'day' field to INTERVAL so 1 day interval can be  (momjian@svr1.postgresql.org (Bruce Momjian))
List pgsql-committers
Bruce Momjian wrote:
> Log Message:
> -----------
> Add 'day' field to INTERVAL so 1 day interval can be distinguished from
> 24 hours. This is very helpful for daylight savings time:
>
>     select '2005-05-03 00:00:00 EST'::timestamp with time zone + '24 hours';
>           ?column?
>     ----------------------
>     2005-05-04 01:00:00-04
>
>     select '2005-05-03 00:00:00 EST'::timestamp with time zone + '1 day';
>           ?column?
>     ----------------------
>     2005-05-04 01:00:00-04

Oops, meant:

        SELECT '2005-04-03 00:00:00'::timestamp WITH TIME ZONE + '1 day';
                ?column?
        ------------------------
         2005-04-04 00:00:00-04

        SELECT '2005-04-03 00:00:00'::timestamp WITH TIME ZONE + '24 hours';
                ?column?
        ------------------------
         2005-04-04 01:00:00-04

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-committers by date:

Previous
From: momjian@svr1.postgresql.org (Bruce Momjian)
Date:
Subject: pgsql: Add 'day' field to INTERVAL so 1 day interval can be
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Add 'day' field to INTERVAL so 1 day interval can be