Re: Problem in converting int to timestamp value - why?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem in converting int to timestamp value - why?
Дата
Msg-id 19495.1095611486@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Problem in converting int to timestamp value - why?  (Michael Fuhr <mike@fuhr.org>)
Ответы Re: Problem in converting int to timestamp value - why?  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
Michael Fuhr <mike@fuhr.org> writes:
> The leading space is confusing to_timestamp():

>   test=> SELECT to_timestamp(' 2004 12 17', 'YYYY MM DD');
>       to_timestamp
>   ---------------------
>    2171-11-06 06:00:00

I'd still say this is a bug.  If to_timestamp can't match the input to
the pattern, it should throw an error, not silently return garbage.

            regards, tom lane

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

Предыдущее
От: Soeren Gerlach
Дата:
Сообщение: Re: Problem in converting int to timestamp value - why?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: import/export or moving data between databases