CVS User Account cvsuser
Wed Jul 26 05:32:09 PDT 2006
Log Message:
-----------
SET standard_conforming_strings to 'off' for pg 8.2 and newer.

Modified Files:
--------------
    slony1-engine/src/slon:
        dbutils.c (r1.22 -> r1.23)

-------------- next part --------------
Index: dbutils.c
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slon/dbutils.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -Lsrc/slon/dbutils.c -Lsrc/slon/dbutils.c -u -w -r1.22 -r1.23
--- src/slon/dbutils.c
+++ src/slon/dbutils.c
@@ -125,9 +125,20 @@
                 PQfinish(dbconn);
                 return NULL;
         }
+	
         slon_log(SLON_DEBUG4,
                 "version for \"%s\" is %d\n", conninfo, conn->pg_version);
 
+	if (conn->pg_version >= 80200)
+	{
+		slon_mkquery(&query, "set standard_conforming_strings to 'off'");
+		res = PQexec(dbconn, dstring_data(&query));
+		if (!(PQresultStatus(res) == PGRES_COMMAND_OK))
+		{
+			slon_log(SLON_ERROR, "Unable to set the standard_conforming_strings to off\n");
+        	}
+		PQclear(res);
+	}
 	return conn;
 }
 



More information about the Slony1-commit mailing list