From: | Terje Elde <terje(at)elde(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | David Gould <daveg(at)sonic(dot)net>, amutu(at)amutu(dot)com, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #13805: plpgsql execute using expression evaluate wrong |
Date: | 2015-12-08 07:57:45 |
Message-ID: | E4F94AE4-1D62-4766-84F9-E96208B5156C@elde.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
> On 08 Dec 2015, at 07:36, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Trying to decide which characters are legitimate noise and which
> aren't seems like a tarbaby best not to get stuck to :-(
I'd like to argue that if you need PostgreSQL-native time from a string, and want more control and verification, that's probably something that's best left to the application anyway.
I fail to see how PostgreSQL can reasonably be made to be "perfect" for all possible cases of dirty input being casted to interval.
The application is in a much better position to deal with this, presumably knowing more about the input, and being a cleaner place to put any parsing and handling.
From there, it can be passed to PostgreSQL either as a native interval object, or a cleaned up string.
In other words, I agree about not changing the behavior.
That said, I do wonder if it could be worthwhile to consider having an option to trigger a notice or error upon dirty bytes getting skipped, as a way of declaring "all input should be clean (now), please accept nothing less". The again, that certainly falls outside the scope of -bugs(at)(dot)
Terje
From | Date | Subject | |
---|---|---|---|
Next Message | Shulgin, Oleksandr | 2015-12-08 10:54:50 | Re: BUG #13799: Unexpected multiple exection of user defined function with out parameters |
Previous Message | David Gould | 2015-12-08 07:24:48 | Re: BUG #13805: plpgsql execute using expression evaluate wrong |