Re: BUG #16216: the result of to_date function with negative year number not same as BC year number - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #16216: the result of to_date function with negative year number not same as BC year number
Date
Msg-id 27853.1579274992@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #16216: the result of to_date function with negative yearnumber not same as BC year number  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-bugs
Fabien COELHO <coelho@cri.ensmp.fr> writes:
>> I'm pretty sure that's intentional; if you specify two or fewer
>> year digits, a year between 1970 and 2069 is presumed to be meant.

> Hmmm. Ok, I see.

> If I write a fuzzy "31/12/01", I'm pretty okay with 2001-12-31. but if I 
> write '1 AD', I would expect '1 AD'.

Yeah, a case could be made for applying that rule only when there's
exactly two year digits.  OTOH, it's been like this for a very long
time with few complaints.  Besides, it'd still be weird when you
write "11 AD", so really people who are dealing with such dates
need to learn to write four year digits.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: BUG #16216: the result of to_date function with negative yearnumber not same as BC year number
Next
From: Alvaro Herrera
Date:
Subject: Re: Reorderbuffer crash during recovery