Re: 3 digit ISO dates

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 3 digit ISO dates
Дата
Msg-id 10276.1063637079@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 3 digit ISO dates  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Список pgsql-hackers
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> Ooooh - that must have been a side effect of the 'only parse dates in set
> format' changes...was it intended?

Yes, I thought so.  The relevant bit of the change is here:

!   /***
!    * Enough digits to be unequivocal year? Used to test for 4 digits or
!    * more, but we now test first for a three-digit doy so anything
!    * bigger than two digits had better be an explicit year.
!    * - thomas 1999-01-09
!    * Back to requiring a 4 digit year. We accept a two digit
!    * year farther down. - thomas 2000-03-28
!    ***/
!   else if (flen >= 4)   {
!       *tmask = DTK_M(YEAR);

--- 2408,2498 ----

!           case 0:
!               /*
!                * Nothing so far; make a decision about what we think the
!                * input is.  There used to be lots of heuristics here, but
!                * the consensus now is to be paranoid.  It *must* be either
!                * YYYY-MM-DD (with a more-than-two-digit year field), or the
!                * field order defined by DateOrder.
!                */
!               if (flen >= 3 || DateOrder == DATEORDER_YMD)
!               {
!                   *tmask = DTK_M(YEAR);

        regards, tom lane


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

Предыдущее
От: Robert Treat
Дата:
Сообщение: Re: SetQuerySnapshot in 7.4
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: beta3 tag, bundled and available ...