Re: BUG #16216: the result of to_date function with negative year number not same as BC year number

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #16216: the result of to_date function with negative year number not same as BC year number
Дата
Msg-id 27853.1579274992@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #16216: the result of to_date function with negative yearnumber not same as BC year number  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список 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 по дате отправления:

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: BUG #16216: the result of to_date function with negative yearnumber not same as BC year number
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Reorderbuffer crash during recovery