Strange results from to_timestamp

Поиск
Список
Период
Сортировка
От Mario Weilguni
Тема Strange results from to_timestamp
Дата
Msg-id 200604061457.45346.mweilguni@sime.com
обсуждение исходный текст
Ответы Re: Strange results from to_timestamp  (Mario Weilguni <mweilguni@sime.com>)
Re: Strange results from to_timestamp  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Strange results from to_timestamp  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
mydb=# select to_timestamp('00000000 0300','yyyymmdd hh24mi');      to_timestamp
---------------------------0001-01-01 03:00:00+01 BC
(1 row)

Questionable, but probably valid.



mydb=# select to_timestamp('         0300','yyyymmdd hh24mi');     to_timestamp
------------------------0300-12-25 03:00:00+01
(1 row)

This puzzles me. Where is the 25th of december coming from?



mydb=# select to_timestamp('         030004','yyyymmdd hh24mi');     to_timestamp
------------------------0382-04-23 03:00:00+01
(1 row)

Same as above.


mydb=# select to_timestamp('         040004','yyyymmdd hh24mi');     to_timestamp
------------------------0509-10-10 04:00:00+01


I think all except the first one should raise a warning, isn't it? Where can I 
find the source code of this function?

Best regards,Mario Weilguni



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

Предыдущее
От: "Jonah H. Harris"
Дата:
Сообщение: Re: Support Parallel Query Execution in Executor
Следующее
От: Mario Weilguni
Дата:
Сообщение: Re: Strange results from to_timestamp