From: | "Daniel Verite" <daniel(at)manitou-mail(dot)org> |
---|---|
To: | Havasvölgyi Ottó <havasvolgyi(dot)otto(at)gmail(dot)com> |
Cc: | "Pg - General" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: 8.3: timestamp subtraction |
Date: | 2009-05-23 13:13:18 |
Message-ID: | 6d716826-b95c-4241-a1f6-1aa3b5741f7d@mm |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Havasvölgyi Ottó wrote:
> I don't know why this query returns false:
>
> 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?
It works for me:
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)
test=> select version();
version
-----------------------------------------------------------------------
-----------------------------
PostgreSQL 8.3.7 on i486-pc-linux-gnu, compiled by GCC gcc-4.3.real
(Ubuntu 4.3.2-1ubuntu11) 4.3.2
(1 row)
Best regards,
--
Daniel
PostgreSQL-powered mail user agent and storage:
http://www.manitou-mail.org
From | Date | Subject | |
---|---|---|---|
Next Message | Christophe | 2009-05-23 13:18:58 | Re: 8.3: timestamp subtraction |
Previous Message | Havasvölgyi Ottó | 2009-05-23 12:01:02 | 8.3: timestamp subtraction |