Re: BUG #1993: Adding/subtracting negative time intervals
От | Nicholas Vinen |
---|---|
Тема | Re: BUG #1993: Adding/subtracting negative time intervals |
Дата | |
Msg-id | 435EE273.4020406@x256.org обсуждение исходный текст |
Ответ на | Re: BUG #1993: Adding/subtracting negative time intervals (Klint Gore <kg@kgb.une.edu.au>) |
Список | pgsql-bugs |
Thanks for all this discussion, fixing, etc. I'm currently having "issues" getting postgres' date/time functions to do what I want. You have obviously spotted some of the reasons for this. Many of my issues disappear when I use 8.1, but it's still in beta. Is it safe for me to use 8.1 in production, if I don't use any of the new features? If not, would it be possible to backport these date/time changes to 8.0 so that my program can operate correctly before 8.1 is finished beta? I can do this backporting myself if someone can point me to the relevant files. (I'm sure I can work it out myself if necessary, but I'm a little busy at the moment). BTW, Postgres' date functions are *great* except for these minor problems. The best I've ever used. Thanks! Nicholas Klint Gore wrote: >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 по дате отправления: