Re: to_date() and invalid dates

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: to_date() and invalid dates
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B17C916E4@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: to_date() and invalid dates  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-general
Thomas Kellerer wrote:
>>> I asked this a while back already:
>>>
>>>    select to_date('2013-02-31', 'yyyy-mm-dd');
>>>
>>> will not generate an error (unlike e.g. Oracle)
>>
>> This is by design.
> 
> When I previously asked this question the answer as "this is based on Oracle's to_date()":
> http://postgresql.1045698.n5.nabble.com/to-char-accepting-invalid-dates-td4598597.html#a4608551

See for example
http://www.postgresql.org/message-id/20099.1350484290@sss.pgh.pa.us
that this is known and accepted behaviour.
However,
http://www.postgresql.org/message-id/22259.1114613632@sss.pgh.pa.us
so I guess that it was not intended, but since it has been that way
for long enough it would be too painful to change it.

So actually my original answer "it is by design" is probably wrong.

"Based upon" should be read as "inspired by" rather than
"compatible with".

Yours,
Laurenz Albe

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Correct query to check streaming replication lag
Следующее
От: Stefan Warten
Дата:
Сообщение: pg_upgrade fails: "Mismatch of relation OID in database" - 9.2.4 to 9.3.2