Re: Bug in to_timestamp().
От | amul sul |
---|---|
Тема | Re: Bug in to_timestamp(). |
Дата | |
Msg-id | 884791796.213185.1466667686999.JavaMail.yahoo@mail.yahoo.com обсуждение исходный текст |
Ответ на | Re: Bug in to_timestamp(). (Alex Ignatov <a.ignatov@postgrespro.ru>) |
Ответы |
Re: Bug in to_timestamp().
|
Список | pgsql-hackers |
On Monday, 20 June 2016 8:53 PM, Alex Ignatov <a.ignatov@postgrespro.ru> wrote: >>On 13.06.2016 18:52, amul sul wrote: >And it wont stop on some simple whitespace. By using to_timestamp you >can get any output results by providing illegal input parameters values: >postgres=# SELECT TO_TIMESTAMP('2016-06-13 99:99:99', 'YYYYMMDD >HH24:MI:SS'); > to_timestamp >------------------------ > 2016-01-06 14:40:39+03 > > (1 row) We do consume extra space from input string, but not if it is in format string, see below: postgres=# SELECT TO_TIMESTAMP('2016-06-13 15:43:36', 'YYYY/MM/DD HH24:MI:SS'); to_timestamp ------------------------ 2016-06-13 15:43:36-07 (1 row) We should have same treatment for format string too. Thoughts? Comments? Regards, Amul Sul
В списке pgsql-hackers по дате отправления: