Re: [HACKERS] postgres and year 2000

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] postgres and year 2000
Дата
Msg-id 18024.916240966@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] postgres and year 2000  (Tom Ivar Helbekkmo <tih@nhh.no>)
Ответы RE: [HACKERS] postgres and year 2000  ("Stupor Genius" <stuporg@erols.com>)
Список pgsql-hackers
Tom Ivar Helbekkmo <tih@nhh.no> writes:
> Not compile-time, no.  But I think it would be a good thing to have
> several run-time options (of which PostgreSQL already has a few), to
> specify exactly which behavior is wanted.  For two digit years, it
> might be useful to be able to specify to the backend that they should
> be handled as, say, 1920-2019, or as the chronologically nearest year
> that ends in the two given digits, or maybe even as being in the
> current century.  When using a four digit year mode, though, I think
> it's a good idea to handle '99' as the year 99, and not e.g. 1999.

IIRC, we already have both behaviors (99->1999AD and 99->99AD)
available, but it's controlled by a combination of the DATESTYLE setting
and the actual formatting of the particular input string.

There doesn't seem to be anything in the documentation about exactly
how ambiguous inputs are parsed.  Thomas, maybe some text needs to
be added?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Brook Milligan
Дата:
Сообщение: Re: [HACKERS] RPM maintainer?
Следующее
От: "Thomas G. Lockhart"
Дата:
Сообщение: Re: [HACKERS] postgres and year 2000