Re: 8.3: timestamp subtraction
От | Havasvölgyi Ottó |
---|---|
Тема | Re: 8.3: timestamp subtraction |
Дата | |
Msg-id | 34608c0c0905231044p21e471a9i7da783d2fedccce@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: 8.3: timestamp subtraction (Ludwig Kniprath <ludwig@kni-online.de>) |
Ответы |
Re: 8.3: timestamp subtraction
Re: 8.3: timestamp subtraction |
Список | pgsql-general |
Thanks.
I tested the standard Win32 distribution of 8.3.6.
The same happens on 8.2. But on 8.0 it works.
When I don't use milliseconds, then it works.
Will 8.4 work fine on Win32 again?
Thanks,
Otto
2009/5/23 Ludwig Kniprath <ludwig@kni-online.de>
Scott Marlowe schrieb:Me too, a testquery-result on a Windows-System with version "PostgreSQL 8.3.0, compiled by Visual C++ build 1400":On Sat, May 23, 2009 at 7:18 AM, Christophe <xof@thebuild.com> wrote:
On May 23, 2009, at 9:13 AM, Daniel Verite wrote:
Could this be due to the OP's build of PG using floating point timestamps?I don't know why this query returns false:It works for me:
SELECT '20040506 070809.010000'::timestamp(6) - '20010203
040506.007000'::timestamp(6) = '1188 day 3 hour 3 minute 3 second 3
millisecond'::interval;
If I just subtract the two timestamps, its result is the interval I
specified.
What may cause this?
test=> SELECT '20040506 070809.010000'::timestamp(6) -
'20010203 040506.007000'::timestamp(6)=
'1188 day 3 hour 3 minute 3 second 3 millisecond'::interval;
?column? ----------
t
(1 row)
That's what I'm thinking
SELECT ('20040506 070809.010000'::timestamp(6) - '20010203 040506.007000'::timestamp(6) - '1188 day 3 hour 3 minute 3 second 3 millisecond'::interval) * 1e10;
=> -00:01:28.220986
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
В списке pgsql-general по дате отправления: