BUG #16419: wrong parsing BC year in to_date() function

The Post Office <noreply@postgresql.org>

From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: dar_alathar@hotmail.com
Date: 2020-05-06T21:26:55Z
Lists: pgsql-bugs, pgsql-hackers
The following bug has been logged on the website:

Bug reference:      16419
Logged by:          Saeed Hubaishan
Email address:      dar_alathar@hotmail.com
PostgreSQL version: 12.2
Operating system:   Windows 10x64
Description:        

select to_date('-1-01-01','yyyy-mm-dd');
will get 
0002-01-01 BC

Commits

  1. Fix handling of BC years in to_date/to_timestamp.

  2. Fix make_timestamp[tz] to accept negative years as meaning BC.

  3. doc: PG 13 relnotes, update TOAST item to mention decompression