On Sat, Jan 25, 2014 at 11:04 AM, Tom Lane <t...@sss.pgh.pa.us> wrote:
> Do the regression tests fail for you when doing this?
>
> What I see is a duplicate occurrence of an escape_string_warning bleat:
>
> *** /home/postgres/pgsql/src/test/regress/expected/plpgsql.out  Fri Jan  3 
> 17:07
> :46 2014
> --- /home/postgres/pgsql/src/test/regress/results/plpgsql.out   Sat Jan 25 
> 13:37
> :20 2014
> ***************
> *** 4568,4573 ****
> --- 4568,4579 ----
>   HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
>   QUERY:  SELECT 'foo\\bar\041baz'
>   CONTEXT:  PL/pgSQL function strtest() line 4 at RETURN
> + WARNING:  nonstandard use of \\ in a string literal
> + LINE 1: SELECT 'foo\\bar\041baz'
> +                ^
> + HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
> + QUERY:  SELECT 'foo\\bar\041baz'
> + CONTEXT:  PL/pgSQL function strtest() line 4 at RETURN
>      strtest
>   -------------
>    foo\bar!baz
>
> ======================================================================
>
> which seems to happen because generate_normalized_query() reruns the
> core lexer on the given statement, and if you got a warning the first
> time, you'll get another one.

Oh, yes, I noticed that and reached the same conclusion. Sorry, I
probably should have mentioned this pro-actively.


-- 
Peter Geoghegan


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to