From: Артем Анисимов <aanisimov@inbox.ru>
To: Bruce Momjian <bruce@momjian.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7722: extract(epoch from age(...)) appears to be broken
Date: Tue, 04 Dec 2012 09:16:14 +0400
Message-ID: <2042272.iJfXXT9BJj@vault13> (raw)
In-Reply-To: <20121204021700.GC7675@momjian.us>
References: <E1TfEH5-0004JE-Qt@wrigleys.postgresql.org>
<20121203060556.GA4601@alvh.no-ip.org>
<20121204021700.GC7675@momjian.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: aanisimov@inbox.ru, bruce@momjian.us, alvherre@2ndquadrant.com, pgsql-bugs@postgresql.org
Subject: Re: BUG #7722: extract(epoch from age(...)) appears to be broken
In-Reply-To: <2042272.iJfXXT9BJj@vault13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox