Changes regarding standard_conforming_strings in postgres
[clsql.git] / notes / postgresql-standards-conforming-strings.txt
diff --git a/notes/postgresql-standards-conforming-strings.txt b/notes/postgresql-standards-conforming-strings.txt
new file mode 100644 (file)
index 0000000..fa3475b
--- /dev/null
@@ -0,0 +1,15 @@
+I found that my database recently started generating extra backslashes
+on roundtrips to the database.
+
+The reason seems to be a change to standards_conforming_strings variable in postgresl
+Beginning in PostgreSQL 9.1, the default is on (prior releases defaulted to off)
+
+
+https://stackoverflow.com/a/3049139
+
+ * I created a new protocol function (database-escape-backslashes database)
+ * I changed the the generic mysql and postgres databases to return T
+ * I made the postgresql-socket-3 backend check for standards_conforming_string
+   which is exposed in the underlying cl-postgres connection
+ * It seems likely that postgresql-socket-3 could always return NIL, as
+   cl-postgres would probably handle this escaping anyway