pgsql: Allow negative years in make_date to represent BC years

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Allow negative years in make_date to represent BC years
Date: 2017-01-19 12:47:24
Message-ID: E1cUC7g-0008JF-TC@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Allow negative years in make_date to represent BC years

There doesn't seem to be any reason not to allow negative years to be
interpreted as BC, so do that.

The documentation is pretty vague on the details of this function, so
nothing needs to change there.

Reported-by: Andy Abelisto, in bug #14446

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/30bcebbdcf23eb8b78e553c4b3b5eb847410ef19

Modified Files
--------------
src/backend/utils/adt/date.c | 14 +++++++++-----
src/test/regress/expected/date.out | 8 ++++++--
src/test/regress/sql/date.sql | 2 +-
3 files changed, 16 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2017-01-19 12:53:31 Re: pgsql: Add function to import operating system collations
Previous Message Amit Kapila 2017-01-19 10:43:44 Re: pgsql: Add function to import operating system collations