Bugs: Browse | Submit New | Admin

[#29237] massive "WARNING: nonstandard use of \\ in a string literal at character" entries in postgresql server log

Date:
2011-05-30 19:26
Priority:
3
Submitted By:
Xuân Baldauf (mediumnet)
Assigned To:
Nobody (None)
Category:
AR-JDBC
State:
Open
Summary:
massive "WARNING: nonstandard use of \\ in a string literal at character" entries in postgresql server log

Detailed description
When effectively using the arjdbc postgresql adapter's escape_bytea() or maybe also quote_string() method, postgresql
complains like this:

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


These complaints could be turned off, however, then many other relevant log entries of the postgresql log file would
also be turned off, too.

The solution is to properly use postgresql's escape mechanisms, e.g.
http://www.postgresql.org/docs/9.0/static/datatype-binary.html#AEN5037
or http://www.postgresql.org/docs/9.0/static/datatype-binary.html#AEN5046 for bytea-data or just as postgresql itself
suggests the E''-string escape format.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item