| От | Michael Fuhr |
|---|---|
| Тема | Re: Problem in converting int to timestamp value - why? |
| Дата | |
| Msg-id | 20040919220922.GA95715@winnie.fuhr.org обсуждение исходный текст |
| Ответ на | Re: Problem in converting int to timestamp value - why? (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Problem in converting int to timestamp value - why?
|
| Список | pgsql-general |
On Sun, Sep 19, 2004 at 12:31:26PM -0400, Tom Lane wrote:
> 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.
Agreed that it's a bug. Returning garbage violates the Principle
of Least Surprise.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера