Re: Date input changed in 7.4 ?

Поиск
Список
Период
Сортировка
От Dennis Björklund
Тема Re: Date input changed in 7.4 ?
Дата
Msg-id Pine.LNX.4.44.0308280654411.31606-100000@zigo.dhs.org
обсуждение исходный текст
Ответ на Re: Date input changed in 7.4 ?  (Kevin Brown <kevin@sysexperts.com>)
Ответы Re: Date input changed in 7.4 ?  (Scott Lamb <slamb@slamb.org>)
Список pgsql-hackers
On Wed, 27 Aug 2003, Kevin Brown wrote:

> There are some cases where it's extremely useful for PostgreSQL to
> accept dates of any format it knows about (ambiguities should be
> resolved either by looking at the current DateStyle or, failing that, by
> applying the recognition in a well-defined order

And the argument bhen this was that it only leads to wrong data. As I see
it, the only time you have dates in different styles is when you get it
from a human entering dates. Then he/she will enter 01/30/03 and it is
interpreted as 2003 January 30, he/she feels happy and enters another date
in january, say 01/10/03 and now maybe it is interpreted as 2003 October
1. Of course that error is not noticed since it worked the previous time..

Even when the dates are generated by a program one should set the
datertyle to match what the program outputs, otherwise one are in trouble
anyway. If the program generate 01/10/03 pg must know what it means and
can not just guess.

I think it is a great change. Having the database guess what you mean
should at least not be the default. Having GuessDates as a variable could
be useful and I thought that was the decision back then (what the
variable was called I don't remember).

-- 
/Dennis



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Beta2 Tag'd and Bundled ...
Следующее
От: "Jeroen T. Vermeulen"
Дата:
Сообщение: Re: 2-phase commit