BUG #14381: justify_interval function works in strange way

From: maciej(dot)srebrny+postgresql(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14381: justify_interval function works in strange way
Date: 2016-10-19 08:44:26
Message-ID: 20161019084426.1413.56330@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: 14381
Logged by: Maciej Srebrny
Email address: maciej(dot)srebrny+postgresql(at)gmail(dot)com
PostgreSQL version: 9.3.14
Operating system: AWS - RDS
Description:

I already read that justify_interval function have some limits (BUG-14313)
but this behaviour is very not intuitive:

select justify_interval(current_timestamp - current_timestamp + interval '8
year');
justify_interval
------------------
8 years

select justify_interval(current_timestamp - (current_timestamp - interval '8
year'));
justify_interval
-----------------------
8 years 1 mon 12 days

Browse pgsql-bugs by date

  From Date Subject
Next Message mali.jitendra 2016-10-19 10:43:48 BUG #14382: System.TypeLoadException: Failure has occurred while loading a type
Previous Message Tom Lane 2016-10-19 03:56:59 Re: BUG #14380: pg_config fails to build.