diff -ru MDB2.orig/Driver/pgsql.php MDB2/Driver/pgsql.php
--- MDB2.orig/Driver/pgsql.php 2009-01-14 17:39:15.000000000 +0100
+++ MDB2/Driver/pgsql.php 2009-07-05 17:01:07.107318411 +0200
@@ -452,6 +452,27 @@
}
}
+ // Enable extra compatibility settings on 8.2 and later
+ $version = pg_parameter_status($connection, 'server_version');
+ if ($version == false) {
+ return $this->raiseError(null, null, null,
+ 'Unable to retrieve server version', __FUNCTION__);
+ }
+ $version = explode ('.', $version);
+ if ( $version['0'] > 8
+ || ($version['0'] == 8 && $version['1'] >= 2)
+ ) {
+ if (!@pg_query($connection, "SET SESSION STANDARD_CONFORMING_STRINGS = OFF")) {
+ return $this->raiseError(null, null, null,
+ 'Unable to set standard_conforming_strings to off', __FUNCTION__);
+ }
+
+ if (!@pg_query($connection, "SET SESSION ESCAPE_STRING_WARNING = OFF")) {
+ return $this->raiseError(null, null, null,
+ 'Unable to set escape_string_warning to off', __FUNCTION__);
+ }
+ }
+
return $connection;
}