Commit 893dfbe6 authored by R.W.Majeed's avatar R.W.Majeed
Browse files

fixed wrong string quoting

parent d92e222c
......@@ -14,8 +14,11 @@ public class VirtualStatement implements Statement{
public String escapeString(String value){
// TODO escape
return value.replace("\\","\\\\").replace("'", "\\'");
// escape string literals
// postgres v9.1 and up use standard_conforming_strings=on
// this means that backslashes are treated literal and there are no escape characters
// a literal single quote ' must be written as ''
return value.replace("'","''");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment