to_char() accepting invalid dates?

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема to_char() accepting invalid dates?
Дата
Msg-id j00qg6$lvf$1@dough.gmane.org
обсуждение исходный текст
Список pgsql-sql
Hi,

I just noticed that to_char() will "accept" invalid dates such as 2011-02-31 and "adjust" them accordingly:

postgres=> select to_date('20110231', 'yyyymmdd');  to_date
------------ 2011-03-03
(1 row)

is there a way to have to_date() raise an exception in such a case?

Regards
Thomas



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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Looking for a "show create table " equivalent
Следующее
От: Jasen Betts
Дата:
Сообщение: Re: to_char() accepting invalid dates?