Re: to_date_valid()

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: to_date_valid()
Дата
Msg-id bd34ca87-211c-e99a-5130-5872a53f4b12@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: to_date_valid()  (Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>)
Список pgsql-hackers
On 9/9/16 4:48 AM, Andreas 'ads' Scherbaum wrote:
> ValidateDate() will tell you if it's a valid date. But not if the 
> transformation was correct:
> 
> postgres=# SELECT to_date('2011 12  18', 'YYYY MM   DD');
>    to_date
> ------------
>   2011-12-08
> (1 row)
> 
> (with the patch from Artur)
> 
> 
> Any idea how to solve this problem?

I think we need to do overflow checking as we read the various values,
in do_to_timestamp() and functions called from it.  This would be very
similar to overflow checking in input functions.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: System load consideration before spawning parallel workers
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Hash Indexes