Re: A creepy story about dates. How to prevent it?

Поиск
Список
Период
Сортировка
От Dennis Björklund
Тема Re: A creepy story about dates. How to prevent it?
Дата
Msg-id Pine.LNX.4.44.0306190903050.25222-100000@zigo.dhs.org
обсуждение исходный текст
Ответ на Re: A creepy story about dates. How to prevent it?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Wed, 18 Jun 2003, Tom Lane wrote:

> > I'm pretty sure it was the other way around, make strict locale / date
> > checking the standard and a GUC to turn it off
>
> I think that on grounds of backwards compatibility alone, we should
> leave the out-of-the-box default behavior as it is.

Who can rely on pg to accept dates that are "wrong"?

If some program (or person) generates a date where the month is 22
according to the DateStyle, then pg can guess that it's a day and correct
the date. But if someone relies on this then they will most likely also
generate other dates that will be accepted and intepreted by pg in a
different way. And you got broken data in the database.

The reason it have worked before is because everyone who had it wrong
before had to fix it anyway or get broken data into the database.

--
/Dennis


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

Предыдущее
От: weigelt@metux.de
Дата:
Сообщение: best method for mirroring ?
Следующее
От: Ron Johnson
Дата:
Сообщение: Re: A creepy story about dates. How to prevent it?