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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: "David G. Johnston" <david.g.johnston@gmail.com>, Bruce Momjian <bruce@momjian.us>, Laurenz Albe <laurenz.albe@cybertec.at>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-09-29T17:50:07Z
Lists: pgsql-bugs, pgsql-hackers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> Adding support for negative years in make_timestamp seems pretty 
> straightforward; see attached patch.

In hopes of moving things along, I pushed that, along with documentation
additions.  I couldn't quite convince myself that it was a bug fix
though, so no back-patch.  (I don't think we really need any doc
changes about it in the back branches, either.)

			regards, tom lane



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