Re: pgsql: Add 'day' field to INTERVAL so 1 day interval

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Bruce Momjian <momjian(at)svr1(dot)postgresql(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add 'day' field to INTERVAL so 1 day interval
Date: 2005-07-20 17:21:45
Message-ID: 200507201721.j6KHLjT14715@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-patches

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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2005-07-20 17:23:22 Re: pgsql: Add 'day' field to INTERVAL so 1 day interval can be
Previous Message Bruce Momjian 2005-07-20 16:42:32 pgsql: Add 'day' field to INTERVAL so 1 day interval can be

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-07-20 17:23:22 Re: pgsql: Add 'day' field to INTERVAL so 1 day interval can be
Previous Message Tom Lane 2005-07-20 17:20:19 Re: Writing Commit Status hint bits (was Re: [HACKERS] Constant WAL replay)