From: | Andrew - Supernews <andrew+nonews(at)supernews(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #1637: age() function is giving different results |
Date: | 2005-04-28 22:35:43 |
Message-ID: | slrnd72p9v.26ds.andrew+nonews@trinity.supernews.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On 2005-04-28, "J.Simon Goodall" <simon(at)EstanciaViamonte(dot)com> wrote:
>
> The following bug has been logged online:
>
> Bug reference: 1637
> Logged by: J.Simon Goodall
> Email address: simon(at)EstanciaViamonte(dot)com
> PostgreSQL version: 7.4.2
> Operating system: Linux
> Description: age() function is giving different results
> Details:
>
> With the same query the age function is giving me two results, one as it
> should be (34 years) and the other one is off by 1 hour, the query is a
> single one so the results I asume should be the same.
>
> I have tried finding the age(,) function in the source but had no luck.
I did some analysis for this one when it was mentioned just now in the irc
chan. I can reproduce on 7.4.x as follows:
test=> set timezone to 'America/Buenos_Aires';
SET
test=> select age(date '2005-05-05', date '1964-05-05');
age
-----------------------------------
40 years 11 mons 30 days 23:00:00
(1 row)
Doesn't occur with any other timezones I tried, also doesn't occur if
you explicitly cast the dates to timestamp (not timestamptz) which
causes the other version of age() to be used instead. So this is obviously
a timezone-related issue. Couldn't reproduce on 8.0.1 with any timezone.
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2005-04-29 06:05:36 | Re: BUG #1636: Foreign key referencing inherited table fails. |
Previous Message | Tom Lane | 2005-04-28 22:26:05 | Re: BUG #1637: age() function is giving different results |