Re: BUG #13805: plpgsql execute using expression evaluate wrong - Mailing list pgsql-bugs

From David Gould
Subject Re: BUG #13805: plpgsql execute using expression evaluate wrong
Date
Msg-id 20151207232448.58fa8420@engels
Whole thread Raw
In response to Re: BUG #13805: plpgsql execute using expression evaluate wrong  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Tue, 08 Dec 2015 01:36:39 -0500
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> The datetime input parser tends to consider most non-alphanumeric
> characters as being insignificant except as field separators.  We could
> tighten that up, but I think we should tread pretty carefully for fear of
> breaking cases that used to work.  A trivial example:
...
> regression=# select '1 mon$ 1 day'::interval;
>   interval
> -------------
>  1 mon 1 day
> (1 row)
>
> Trying to decide which characters are legitimate noise and which
> aren't seems like a tarbaby best not to get stuck to :-(

# select '#!1!#month,?=~&(12$[day*() '::interval;
   interval
---------------
 1 mon 12 days
(1 row)

I feel so ... dirty....

-dg

--
David Gould              510 282 0869         daveg@sonic.net
If simplicity worked, the world would be overrun with insects.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #13805: plpgsql execute using expression evaluate wrong
Next
From: Terje Elde
Date:
Subject: Re: BUG #13805: plpgsql execute using expression evaluate wrong