Re: to_timestamp error handling.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: to_timestamp error handling.
Дата
Msg-id 788.1244644922@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: to_timestamp error handling.  (Greg Stark <stark@enterprisedb.com>)
Ответы Re: to_timestamp error handling.  (Dhaval Jaiswal <dhaval.jaiswal@enterprisedb.com>)
Список pgsql-bugs
Greg Stark <stark@enterprisedb.com> writes:
> On Wed, Jun 10, 2009 at 3:23 PM, Dhaval
> Jaiswal<dhaval.jaiswal@enterprisedb.com> wrote:
>> postgres=# select to_timestamp('20096010','YYYYMMDD');
>> ---------------------------
>>  2013-12-18 00:00:00+05:30

> I suspect you'll find that the 60th month after the start of 2009 is
> in fact december 2013.

Yeah.  I was kind of surprised that CVS HEAD doesn't complain about this
--- I thought we'd tightened up the error checking in to_timestamp.

I think it's been occasionally seen as a feature that something like
'2009-02-29' will be read as '2009-03-01', but it's hard to imagine a
real use case for month outside 1-12.

            regards, tom lane

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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: to_timestamp error handling.
Следующее
От: Simon Bertrang
Дата:
Сообщение: Re: patch to fix configure(.in) on openbsd wrt/ krb5/com_err and readline linking