Fix make_timestamp[tz] to accept negative years as meaning BC. Previously we threw an error. But make_date already allowed the case, so it is inconsistent as well as unhelpful for make_timestamp not to.
Both functions continue to reject year zero. Code and test fixes by Peter Eisentraut, doc changes by me Discussion: https://postgr.es/m/[email protected] Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/a094c8ff53523e88ff9dd28ad467618039e27b58 Modified Files -------------- doc/src/sgml/func.sgml | 12 ++++++++++-- src/backend/utils/adt/timestamp.c | 14 +++++++++----- src/test/regress/expected/date.out | 2 ++ src/test/regress/expected/timestamp.out | 11 ++++++++++- src/test/regress/sql/date.sql | 1 + src/test/regress/sql/timestamp.sql | 5 ++++- 6 files changed, 36 insertions(+), 9 deletions(-)
