Re: Bug in to_timestamp().
От
Alex Ignatov
Тема
Re: Bug in to_timestamp().
Дата
Msg-id
1877e60a-a970-18b5-453c-e342f96150e6@postgrespro.ru
Ответ на
Re: Bug in to_timestamp(). (Bruce Momjian)
Список
Дерево обсуждения
Bug in to_timestamp(). amul sul <sul_amul@yahoo.co.in>
Re: Bug in to_timestamp(). Tom Lane <tgl@sss.pgh.pa.us>
Re: Bug in to_timestamp(). Robert Haas <robertmhaas@gmail.com>
Re: Bug in to_timestamp(). amul sul <sul_amul@yahoo.co.in>
Re: Bug in to_timestamp(). Robert Haas <robertmhaas@gmail.com>
Re: Bug in to_timestamp(). Tom Lane <tgl@sss.pgh.pa.us>
Re: Bug in to_timestamp(). Alex Ignatov <a.ignatov@postgrespro.ru>
Re: Bug in to_timestamp(). Albe Laurenz <laurenz.albe@wien.gv.at>
Re: Bug in to_timestamp(). Alex Ignatov <a.ignatov@postgrespro.ru>
Re: Bug in to_timestamp(). Steve Crawford <scrawford@pinpointresearch.com>
Re: Bug in to_timestamp(). "Joshua D. Drake" <jd@commandprompt.com>
Re: Bug in to_timestamp(). Robert Haas <robertmhaas@gmail.com>
Re: Bug in to_timestamp(). Tom Lane <tgl@sss.pgh.pa.us>
Re: Bug in to_timestamp(). "Joshua D. Drake" <jd@commandprompt.com>
Re: Bug in to_timestamp(). Steve Crawford <scrawford@pinpointresearch.com>
Re: Bug in to_timestamp(). Robert Haas <robertmhaas@gmail.com>
Re: Bug in to_timestamp(). Gavin Flower <GavinFlower@archidevsys.co.nz>
Re: Bug in to_timestamp(). "David G. Johnston" <david.g.johnston@gmail.com>
Re: Bug in to_timestamp(). Alex Ignatov <a.ignatov@postgrespro.ru>
Re: Bug in to_timestamp(). amul sul <sul_amul@yahoo.co.in>
Re: Bug in to_timestamp(). Bruce Momjian <bruce@momjian.us>
Re: Bug in to_timestamp(). Alex Ignatov <a.ignatov@postgrespro.ru>
Re: Bug in to_timestamp(). "David G. Johnston" <david.g.johnston@gmail.com>
Re: Bug in to_timestamp(). Robert Haas <robertmhaas@gmail.com>
Re: Bug in to_timestamp(). Alex Ignatov <a.ignatov@postgrespro.ru>
Re: Bug in to_timestamp(). "David G. Johnston" <david.g.johnston@gmail.com>
Re: Bug in to_timestamp(). Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Bug in to_timestamp(). Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Bug in to_timestamp(). Robert Haas <robertmhaas@gmail.com>
Re: Bug in to_timestamp(). Tom Lane <tgl@sss.pgh.pa.us>
Re: Bug in to_timestamp(). Alex Ignatov <a.ignatov@postgrespro.ru>
Re: Bug in to_timestamp(). Robert Haas <robertmhaas@gmail.com>
Re: Bug in to_timestamp(). Tom Lane <tgl@sss.pgh.pa.us>
Re: Bug in to_timestamp(). Artur Zakirov <a.zakirov@postgrespro.ru>
Re: Bug in to_timestamp(). Pavel Stehule <pavel.stehule@gmail.com>
Re: Bug in to_timestamp(). Artur Zakirov <a.zakirov@postgrespro.ru>
Re: Bug in to_timestamp(). amul sul <sul_amul@yahoo.co.in>
Re: Bug in to_timestamp(). Robert Haas <robertmhaas@gmail.com>
Re: Bug in to_timestamp(). amul sul <sul_amul@yahoo.co.in>
Re: Bug in to_timestamp(). Artur Zakirov <a.zakirov@postgrespro.ru>
Re: Bug in to_timestamp(). Artur Zakirov <a.zakirov@postgrespro.ru>
Re: Bug in to_timestamp(). amul sul <sul_amul@yahoo.co.in>
Re: Bug in to_timestamp(). Robert Haas <robertmhaas@gmail.com>
Re: Bug in to_timestamp(). Artur Zakirov <a.zakirov@postgrespro.ru>
Re: Bug in to_timestamp(). amul sul <sul_amul@yahoo.co.in>
Re: Bug in to_timestamp(). Artur Zakirov <a.zakirov@postgrespro.ru>
Re: Bug in to_timestamp(). amul sul <sul_amul@yahoo.co.in>
Re: Bug in to_timestamp(). Artur Zakirov <a.zakirov@postgrespro.ru>
Re: Bug in to_timestamp(). amul sul <sulamul@gmail.com>
Re: Bug in to_timestamp(). Artur Zakirov <a.zakirov@postgrespro.ru>
Re: Bug in to_timestamp(). amul sul <sulamul@gmail.com>
Re: Bug in to_timestamp(). amul sul <sul_amul@yahoo.co.in>
Re: Bug in to_timestamp(). amul sul <sul_amul@yahoo.co.in>
Re: Bug in to_timestamp(). Tom Lane <tgl@sss.pgh.pa.us>
Re: Bug in to_timestamp(). amul sul <sulamul@gmail.com>
Re: Bug in to_timestamp(). Robert Haas <robertmhaas@gmail.com>
Re: Bug in to_timestamp(). Tom Lane <tgl@sss.pgh.pa.us>
Re: Bug in to_timestamp(). Amul Sul <sulamul@gmail.com>
Re: Bug in to_timestamp(). Michael Paquier <michael.paquier@gmail.com>
Re: Bug in to_timestamp(). Artur Zakirov <a.zakirov@postgrespro.ru>
Re: Bug in to_timestamp(). Tom Lane <tgl@sss.pgh.pa.us>
Re: Bug in to_timestamp(). Artur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Bug in to_timestamp(). Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Bug in to_timestamp(). Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Michael Paquier <michael.paquier@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Thomas Munro <thomas.munro@enterprisedb.com>
Re: [HACKERS] Bug in to_timestamp(). Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Dmitry Dolgov <9erthalion6@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). "David G. Johnston" <david.g.johnston@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). "David G. Johnston" <david.g.johnston@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). "David G. Johnston" <david.g.johnston@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). amul sul <sulamul@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). amul sul <sulamul@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Bug in to_timestamp(). Prabhat Sahu <prabhat.sahu@enterprisedb.com>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). amul sul <sulamul@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). amul sul <sulamul@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). amul sul <sulamul@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Liudmila Mantrova <l.mantrova@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Liudmila Mantrova <l.mantrova@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: Bug in to_timestamp(). Haribabu Kommi <kommi.haribabu@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Michael Paquier <michael.paquier@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Amul Sul <sulamul@gmail.com>
Re: [HACKERS] Bug in to_timestamp(). Artur Zakirov <a.zakirov@postgrespro.ru>
Re: [HACKERS] Bug in to_timestamp(). David Steele <david@pgmasters.net>
Re: Bug in to_timestamp(). "David G. Johnston" <david.g.johnston@gmail.com>
Re: Bug in to_timestamp(). Robert Haas <robertmhaas@gmail.com>
Re: Bug in to_timestamp(). Bruce Momjian <bruce@momjian.us>
Re: Bug in to_timestamp(). "David G. Johnston" <david.g.johnston@gmail.com>
On 23.06.2016 16:30, Bruce Momjian wrote:
> On Thu, Jun 23, 2016 at 07:41:26AM +0000, amul sul wrote:
>> On Monday, 20 June 2016 8:53 PM, Alex Ignatov 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?
> Well, the user specifies the format string, while the input string comes
> from the data, so I don't see having them behave the same as necessary.
>
To be honest they not just behave differently. to_timestamp is just
incorrectly handles input data and nothing else.There is no excuse for
such behavior:
postgres=# SELECT TO_TIMESTAMP('20:-16-06:13: 15_43:!36', 'YYYY/MM/DD
HH24:MI:SS'); to_timestamp
------------------------------ 0018-08-05 13:15:43+02:30:17
(1 row)
Alex Ignatov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата: