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.