Re: BUG #7722: extract(epoch from age(...)) appears to be broken - Mailing list pgsql-bugs

From Артем Анисимов
Subject Re: BUG #7722: extract(epoch from age(...)) appears to be broken
Date
Msg-id 2042272.iJfXXT9BJj@vault13
Whole thread Raw
In response to Re: BUG #7722: extract(epoch from age(...)) appears to be broken  (Bruce Momjian <bruce@momjian.us>)
List pgsql-bugs
Dear Mr. Herrera and Mr. Momjian,

thank you for your feedback and for explaining that age() better not be used.

On Monday 03 December 2012 03:05:57 Alvaro Herrera wrote:
> The problem is that age() returns 30 days in one case, and "one month" in
> the other; extract() then considers the month as equivalent to 30 days.
> This is documented as such, see [1].

On Monday 03 December 2012 21:17:00 Bruce Momjian wrote:
> Wow, that is a weird case.  In the first test, we count the number of
> days because it is less than a full month.  In the second case, we call
> it a full month, but then forget how long it is.  Not sure how we could
> improve this.

Best regargs,
Artem Anisimov.




pgsql-bugs by date:

Previous
From: marco_aapj@hotmail.com
Date:
Subject: BUG #7728: Trouble installing postgresql for the first time
Next
From: "Duggirala, Manikanth (TCS)"
Date:
Subject: PostgreSQL v8.1.11 compatibility with OS 2008 R2