From: | coolman(dot)peto(at)centrum(dot)cz |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #14313: justify interval bug |
Date: | 2016-09-05 16:31:58 |
Message-ID: | 20160905163158.1413.60004@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 14313
Logged by: Peter Peterkys
Email address: coolman(dot)peto(at)centrum(dot)cz
PostgreSQL version: 9.3.14
Operating system: Ubuntu 14.04 LTS
Description:
The function "justify_interval" does not work properly.
E.g. if I subtract two different dates with the same month and with the same
day, but with different year, then I got greater interval than I should
get.
Please see my example
select justify_interval('2016-09-01'::timestamp - '1996-09-01') as test;
I got result:
'20 years 3 mons 15 days'
How is it possible? I should got the result:
'20 years' right?
From | Date | Subject | |
---|---|---|---|
Next Message | Bazan, Hernan | 2016-09-05 17:27:09 | Re: BUG #14312: Hardcoded dbname on test_postmaster_connection |
Previous Message | Tom Lane | 2016-09-05 15:13:26 | Re: BUG #14312: Hardcoded dbname on test_postmaster_connection |