From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: szx9231@gmail.com
Subject: BUG #16216: the result of to_date function with negative year number not same as BC year number
Date: Fri, 17 Jan 2020 12:42:19 +0000
Message-ID: <16216-68da08087f3aeb78@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 16216
Logged by: zhongxuan sun
Email address: szx9231@gmail.com
PostgreSQL version: 12.0
Operating system: centos7
Description:
example:
postgres=# select to_date('-120', 'yyyy');
to_date
---------------
0121-01-01 BC
(1 row)
postgres=# select to_date('120bc', 'yyyybc');
to_date
---------------
0120-01-01 BC
(1 row)
I think -120 means 120bc, however, the output is 121bc not 120bc.
Thanks~
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, szx9231@gmail.com
Subject: Re: BUG #16216: the result of to_date function with negative year number not same as BC year number
In-Reply-To: <16216-68da08087f3aeb78@postgresql.org>
References: <16216-68da08087f3aeb78@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox