Re: is this my date problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: is this my date problem
Дата
Msg-id 26742.1065103479@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: is this my date problem  (Karel Zak <zakkr@zf.jcu.cz>)
Ответы Re: is this my date problem  (Karel Zak <zakkr@zf.jcu.cz>)
Список pgsql-bugs
Karel Zak <zakkr@zf.jcu.cz> writes:
>  The to_timestamp() do nothing with date/time and use internal
>  tm2timestamp() routine only. I don't think that check all date/time
>  ranges in to_timestamp() is good idea if it's already implemented at
>  the another place in our code.

But it evidently *isn't* checked.  As of CVS tip:

regression=# select to_timestamp('44 October 2003', 'DD FMMonth YYYY');
      to_timestamp
------------------------
 2003-11-13 00:00:00-05
(1 row)

The regular timestamp input converter certainly has the checks:

regression=# select '44 October 2003'::timestamp;
ERROR:  invalid input syntax for type timestamp: "44 October 2003"

but evidently those checks are not in whatever code path to_timestamp
is calling.

            regards, tom lane

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

Предыдущее
От: Max Kellermann
Дата:
Сообщение: 7.3.4: memory leak in fe-exec.c:279 (realloc)
Следующее
От: Karel Zak
Дата:
Сообщение: Re: is this my date problem