8.3: timestamp subtraction

From: Havasvölgyi Ottó <havasvolgyi(dot)otto(at)gmail(dot)com>
To: Pg - General <pgsql-general(at)postgresql(dot)org>
Subject: 8.3: timestamp subtraction
Date: 2009-05-23 12:01:02
Message-ID: 34608c0c0905230501h1aa5f035r391a049f59995e48@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

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?

Thanks,
Otto

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Verite 2009-05-23 13:13:18 Re: 8.3: timestamp subtraction
Previous Message Filip Rembiałkowski 2009-05-23 11:24:28 Re: Asssociative Arrays: Best practices / snippets?