Re: Validation in to_date()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Validation in to_date()
Дата
Msg-id 28727.1358194481@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Validation in to_date()  (Hitoshi Harada <umi.tanuki@gmail.com>)
Список pgsql-hackers
Hitoshi Harada <umi.tanuki@gmail.com> writes:
> to_date() doesn't check the date range, which results in unreadable
> data like this.

> foo=# create table t as select to_date('9999-12-10 BC', 'YYYY-MM-DD
> BC')::timestamp;
> SELECT 1
> foo=# table t;
> ERROR:  timestamp out of range

> Attached is to add IS_VALID_JULIAN() as we do like in date_in().  I
> think to_date() should follow it because it is the entrance place to
> check sanity.

This looks like a good idea, will commit.
        regards, tom lane



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

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: count(*) of zero rows returns 1
Следующее
От: Greg Smith
Дата:
Сообщение: Re: Timing events WIP v1