Re: BUG #1993: Adding/subtracting negative time intervals
| От | Klint Gore |
|---|---|
| Тема | Re: BUG #1993: Adding/subtracting negative time intervals |
| Дата | |
| Msg-id | 435EC3862AD.2D99KG@129.180.47.120 обсуждение |
| Ответ на | Re: BUG #1993: Adding/subtracting negative time intervals (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: BUG #1993: Adding/subtracting negative time intervals
Re: BUG #1993: Adding/subtracting negative time intervals |
| Список | pgsql-bugs |
On Tue, 25 Oct 2005 13:28:00 -0400, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> regression=# select '2005-10-29 13:22:00-04'::timestamptz + '1 day'::interval;
> ?column?
> ------------------------
> 2005-10-30 13:22:00-05
> (1 row)
>
> regression=# select '2005-10-30 13:22:00-05'::timestamptz - '2005-10-29 13:22:00-04'::timestamptz;
> ?column?
> ----------------
> 1 day 01:00:00
> (1 row)
>
> ISTM that given the former result, the latter calculation ought to
> produce '1 day', not something else.
Would the '1 day' result know it was 24 hours or be the new 23/24/25
hour version of '1 day'?
If it was the new version, could you get the original values back?
i.e. what would be the result of
select
('2005-10-29 13:22:00-04'::timestamptz +
('2005-10-30 13:22:00-05'::timestamptz -
'2005-10-29 13:22:00-04'::timestamptz)) at time zone 'EST';
klint.
+---------------------------------------+-----------------+
: 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 по дате отправления: