Changes regarding standard_conforming_strings in postgres
[clsql.git] / db-postgresql-socket3 / sql.lisp
index 12929c6e85d3cc9ba20c46e9a2960a87cddf38bf..55547b63f44daa1e06db7106a19f8e9310c41445 100644 (file)
   (clsql-sys:initialize-database-type :database-type :postgresql-socket3))
 
 
+
+;; TODO: there is a good chance this could always return nil as cl-postgres probably
+;; handles this nonsense anyway
+(defmethod clsql-sys::database-escape-backslashes ((database postgresql-socket3-database))
+  (let* ((it (gethash "standard_conforming_strings"
+                      (cl-postgres:connection-parameters
+                       (slot-value database 'connection))))
+         (sit (and it (string it))))
+    (and it (not (string-equal sit "on")))))