Bug #3645

String literal escape database warning in postgresql

Added by Sofia Papagiannaki over 10 years ago. Updated about 10 years ago.

Status:Resolved Start date:04/22/2013
Priority:Medium Due date:
Assignee:Sofia Papagiannaki % Done:


Category:Pithos Spent time: -
Target version:-


Pithos requires to escape SQL wildcards in order to permit such characters in object paths.
Therefore, uses backslashes to escape like patterns
Issue #1768

However, Postgresql 8.4, contrary to the SQL standard, treats dy default baskslashes as escape characters
(this has been changed since postgresql 9.1 - standard_conforming_strings has become on dy default)

As a result, it produces the following output:
WARNING: nonstandard use of \\ in a string literal at character 101
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.

for SQL statements (constructed by sqlalchemy) such as:

SELECT nodes.node 
    FROM nodes 
    WHERE nodes.path LIKE E'c18088be-16b1-4263-8180-043c54e22903' ESCAPE '\\'
The proposed solutions are:


Associated revisions

Revision 235a4227
Added by Sofia Papagiannaki over 10 years ago

pithos: use other db escape string literal character

Refs: #3645


#1 Updated by Sofia Papagiannaki about 10 years ago

  • Status changed from Assigned to Resolved

Also available in: Atom PDF