Re: to_char() accepting invalid dates?

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: to_char() accepting invalid dates?
Дата
Msg-id j01p8u$qjl$1@dough.gmane.org
обсуждение исходный текст
Ответ на Re: to_char() accepting invalid dates?  (Jasen Betts <jasen@xnet.co.nz>)
Ответы Re: to_char() accepting invalid dates?
Список pgsql-sql
Jasen Betts wrote on 18.07.2011 11:23:
>> 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?
>
> it's possible the odd behaviour you get is required by some standard.

That would be *very* odd indeed.


>   jasen=# select '20110303'::date;
Thanks for the tip, this was more a question regarding _why_ to_char() behaves this way.

Thomas



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

Предыдущее
От: Jasen Betts
Дата:
Сообщение: Re: to_char() accepting invalid dates?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: to_char() accepting invalid dates?