Re: [BUGS] BUG #4862: different results in to_date() between 8.3.7 & 8.4.RC1
От | Jeremy Ford |
---|---|
Тема | Re: [BUGS] BUG #4862: different results in to_date() between 8.3.7 & 8.4.RC1 |
Дата | |
Msg-id | 9b8ea02b0906232208n2bf81918ob3530a7c2ae04a5f@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [BUGS] BUG #4862: different results in to_date() between 8.3.7 & 8.4.RC1 (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
I've just compiled and run the 8.4.RC2 code. For both of the following queries I get "0009-03-01"<br /><br /> SELECT to_date('2009 03', ' YYYY MM') as extraspace; --returns "0009-03-01"<br /> SELECT to_date('2009 03', ' YYYY MM') as bogusspace;--returns "0009-03-01"<br /><br /> Was it the intention to imitate Oracle behavior for these two cases in thisrelease? (8.3.7 returns "0009-03-01" as well)<br /><br /> The others in that set of queries all work as expected ("2009-03-01"):<br/> SELECT to_date(' 2009 03', 'YYYYMM') as nospace; --returns "2009-03-01"<br /> SELECT to_date(' 200903', 'YYYY MM') as monthspace; --returns "2009-03-01"<br /> SELECT to_date(' 2009 03', ' YYYY MM') as bothspaces; --returns"2009-03-01"<br /><br />cheers, jeremy.<br /><br /><div class="gmail_quote">On Tue, Jun 23, 2009 at 3:55 AM, TomLane <span dir="ltr"><<a href="mailto:tgl@sss.pgh.pa.us">tgl@sss.pgh.pa.us</a>></span> wrote:<br /><blockquote class="gmail_quote"style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><divclass="im">Brendan Jurd <<a href="mailto:direvus@gmail.com">direvus@gmail.com</a>> writes:<br /></div><divclass="im">> Here's a one-line patch to fix a regression in the new from_char code<br /> > I introducedinto 8.4.<br /><br /> > Versions <= 8.3 skipped over any whitespace immediately preceding any<br /> >integer field, and this behaviour was lost in HEAD when my from_char<br /> > patch was committed back in September'08 [1].<br /><br /></div>Applied along with some regression test additions. Thanks for the<br /> quick response.<br/><br /> regards, tom lane<br /></blockquote></div><br />
В списке pgsql-hackers по дате отправления: