WARNING: nonstandard use of \\ in a string literal at character 69
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
They are generated by an apache/php server using the db.
Any idea how to correct that ?
thx.
P.
Yes.
The first solution:
Edit postgresql.conf, set
standard_conforming_strings = on
and restart the server.
Then backslashes will be treated as normal characters, and if you
need them as escape character, you must preceed the string with an 'E',
as in E'string\nwith newline'.
This solution is good because this will be the default in some future
release.
The second solution:
Preceed all string literals that contain a backslash with an E as above
and replace single backslashes with double backslashes whenever they
should not be treated as escape character.
This may be a little more work.
The third solution:
Edit postgresql.conf, set
escape_string_warning = off
and restret the server.
This will get rid of the warnings; single backslashes will be treated as
escape characters.
I wouldn't recommend this because - as said - behaviour may change in
a future release.
Yours,
Laurenz Albe
Laurenz Albe a écrit :