From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> |
Cc: | "Jonathan Guthrie" <jguthrie(at)brokersys(dot)com>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, "Bruce Momjian" <bruce(at)momjian(dot)us>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: [BUGS] BUG #4027: backslash escaping notdisabled inplpgsql |
Date: | 2009-04-10 18:21:23 |
Message-ID: | 27856.1239387683@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I think you are confusing parsing of the string literal that
>> is the argument of CREATE FUNCTION with the parsing that the plpgsql
>> interpreter does on the function body once it gets it.
> Oh, I'm not confused about that at all. I'm arguing that it's a bad
> idea. I agree with the OP that this is a bug. Did you look at my
> other examples of behavior?
I ignored all the ones that used non-dollar-quote syntax for the overall
function body, since they are just confusing the issue.
> Can you show one case where having plgpsql parse the function body
> based on the standard_conforming_strings GUC would break *anything*
> that now works?
regression=# create function foo() returns int as $$
regression$# begin
regression$# raise notice 'foo\'s bar';
regression$# return 1;
regression$# end$$ language plpgsql;
CREATE FUNCTION
regression=# select foo();
NOTICE: foo's bar
foo
-----
1
(1 row)
In this case the string literal isn't actually ever passed to the main
SQL engine, so the SQL quoting rules aren't relevant. (I don't remember
offhand if anything besides RAISE works that way.)
It may be that this isn't a very important case, but to claim that
it doesn't exist is simply wrong.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2009-04-10 18:21:54 | Re: libpq 8.4 beta1: $PGHOST complains about missing root.crt |
Previous Message | Magnus Hagander | 2009-04-10 17:56:14 | Re: libpq 8.4 beta1: $PGHOST complains about missing root.crt |
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2009-04-10 18:40:06 | Re: Re: [BUGS] BUG #4027: backslash escaping notdisabled inplpgsql |
Previous Message | Pavel Stehule | 2009-04-10 17:51:23 | Re: WIP: to_char, support for EEEE format |