Re: [GENERAL] ISO week dates
От | Bruce Momjian |
---|---|
Тема | Re: [GENERAL] ISO week dates |
Дата | |
Msg-id | 200702161631.l1GGV7i07303@momjian.us обсуждение исходный текст |
Ответ на | Re: [GENERAL] ISO week dates (Alvaro Herrera <alvherre@commandprompt.com>) |
Список | pgsql-patches |
Alvaro Herrera wrote: > > > > The same situation can arise if the user mixes ISO and Gregorian data; > > > > how should Postgres deal with something like to_date('2006-250', > > > > 'IYYY-DDD')? The current behaviour in my patch is actually to assume > > > > that the user meant to say 'IYYY-IDDD', since "the 250th Gregorian day > > > > of the ISO year 2006" is total gibberish. But perhaps it should be > > > > throwing an error message. > > My thinking is that erroneous patterns should throw an error, and not > try to second-guess the user. (IIRC this was being discussed in some > other thread not long ago). The author is working to consistently throw an error for all invalid patterns. Right now, the patch just tries to do its best, which is unfortunately consistent with what the rest of the code currently does. :-) -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
В списке pgsql-patches по дате отправления: