Mailing List Archive

nonstandard use of \\ in postgresql
Do others see this in the error_log?

WARNING: nonstandard use of \\ in a string literal at character 353
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.

I wonder how that affects things. I see it in 1.10 or trunk.

Quickly fgrep -r '\\' . | fgrep -v .svn | less
and filtering out obviously irrelevant ones leaves:

./App/Auth.pm: (my $look = $val{user}) =~ s/([_%\\])/\\$1/g;
./App/Auth.pm: (my $look = $un) =~ s/([_%\\])/\\$1/g;
./Biz/Element/Container.pm: (my $data = $sub->get_value) =~
s/((?:^|\r?\n|\r)+\s*)=/$1\\=/g;
./SOAP/Workflow.pm: (my $look = $adata->{site}) =~ s/([_%\\])/\\$1/g;
./SOAP/Workflow.pm: (my $look = $name) =~ s/([_%\\])/\\$1/g;
./SOAP/Template.pm: (my $look = $args->{workflow}) =~ s/([_%\\])/\\$1/g;
./SOAP/Template.pm: (my $look = $args->{desk}) =~ s/([_%\\])/\\$1/g;
./SOAP/Template.pm: (my $look = $elem_type) =~ s/([_%\\])/\\$1/g;
./SOAP/Category.pm: (my $esc_path = $path) =~ s/([_%\\])/\\$1/g;
./SOAP/Category.pm: (my $esc_parent_path = $parent_path) =~
s/([_%\\])/\\$1/g;
./SOAP/Category.pm: (my $name = $_) =~ s/([_%\\])/\\$1/g;
./SOAP/Media.pm: (my $look = $args->{workflow}) =~ s/([_%\\])/\\$1/g;
./SOAP/Media.pm: (my $look = $args->{desk}) =~ s/([_%\\])/\\$1/g;
./SOAP/Media.pm: (my $look = $c->{type}) =~
s/([_%\\])/\\$1/g;
./SOAP/Media.pm: (my $look = $_) =~ s/([_%\\])/\\$1/g;
./SOAP/Story.pm: (my $look = $args->{workflow}) =~ s/([_%\\])/\\$1/g;
./SOAP/Story.pm: (my $look = $args->{desk}) =~ s/([_%\\])/\\$1/g;
./SOAP/Story.pm: (my $look = $path) =~ s/([_%\\])/\\$1/g;
./SOAP/Story.pm: (my $look = $c->{type}) =~
s/([_%\\])/\\$1/g;
./SOAP/Story.pm: (my $look = $_) =~ s/([_%\\])/\\$1/g;
./SOAP/ElementType.pm: (my $look = $name) =~
s/([_%\\])/\\$1/g;
./SOAP/ElementType.pm: (my $look = $name) =~ s/([_%\\])/\\$1/g;
./Util/Trans/SFTP.pm: ($escaped_base = $orig_base) =~ s/(.)/\\$1/g;
./Util/Burner.pm: ( my $lpath = $path) =~ s/([%_])/\\$1/g;
./Util/Burner.pm: ( my $luri = $uri) =~ s/([%_])/\\$1/g;
Re: nonstandard use of \\ in postgresql [ In reply to ]
On Apr 16, 2009, at 6:35 AM, Scott Lanning wrote:

> Do others see this in the error_log?
>
> WARNING: nonstandard use of \\ in a string literal at character 353
> HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
>
> I wonder how that affects things. I see it in 1.10 or trunk.

This is about whether you have standard_conforming_strings enabled in
your postgresql.conf. But in honesty, it shouldn't happen at all
because we use placeholders for all values. Or we should be. Can you
trace where those warnings are generated in the Bricolage libraries?

Best,

David