BUG #14944: Error for 6 digit year in date comparision

From: abedi0501(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Cc: abedi0501(at)gmail(dot)com
Subject: BUG #14944: Error for 6 digit year in date comparision
Date: 2017-12-04 09:18:33
Message-ID: 20171204091833.27106.81427@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: 14944
Logged by: Akash Bedi
Email address: abedi0501(at)gmail(dot)com
PostgreSQL version: 9.5.4
Operating system: Ubuntu 16/Windows 10
Description:

I'm noticing errors during date comparison,

--Below works fine
select '99999-01-01'::date > now();
?column?
----------
t
(1 row)

--Gives error
select '999999-01-01'::date > now();
ERROR: date out of range for timestamp

Database allows to store date ranges until 5874897 AD '5874897-01-01'::date
but date comparison fails.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Francisco Olarte 2017-12-04 10:45:10 Re: BUG #14944: Error for 6 digit year in date comparision
Previous Message Сергей А. Фролов 2017-12-04 08:51:56 Re: BUG #14940: Duplicated records inspite of primary key and unique constraint