Re: date function bug

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: date function bug
Дата
Msg-id 4d5e514f-4db9-0647-f6ba-6da0648a207b@aklaver.com
обсуждение исходный текст
Ответ на date function bug  ("Abraham, Danny" <danny_abraham@bmc.com>)
Список pgsql-general
On 10/23/19 7:22 AM, Abraham, Danny wrote:
> Hi,
> 
> The function "to_date" does not fail illegal values.
> Is this a known bug?
> What is the recommended type checking?
> 
> 
> ctrlmdb=> select to_date('2018100X','YYYYMMDD');
>    to_date
> ------------
>   2018-10-01
> (1 row)
> 
>

At:

https://www.postgresql.org/docs/11/functions-formatting.html

I would read the section starting :

"Usage notes for date/time formatting: ..."

several times. There a lot of 'if and or buts' in there.

-- 
Adrian Klaver
adrian.klaver@aklaver.com



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: date function bug
Следующее
От: Ravi Krishna
Дата:
Сообщение: Re: date function bug