r100162 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100161‎ | r100162 | r100163 >
Date:21:09, 18 October 2011
Author:mah
Status:ok
Tags:
Comment:
revert r99562 and set standard_conforming_strings “on” by default
Modified paths:
  • /trunk/phase3/includes/db/DatabasePostgres.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabasePostgres.php
@@ -200,6 +200,7 @@
201201 $this->query( "SET client_encoding='UTF8'", __METHOD__ );
202202 $this->query( "SET datestyle = 'ISO, YMD'", __METHOD__ );
203203 $this->query( "SET timezone = 'GMT'", __METHOD__ );
 204+ $this->query( "SET standard_conforming_strings = on", __METHOD__ );
204205
205206 global $wgDBmwschema;
206207 if ( $this->schemaExists( $wgDBmwschema ) ) {
@@ -878,11 +879,7 @@
879880 } elseif ( is_bool( $s ) ) {
880881 return intval( $s );
881882 } elseif ( $s instanceof Blob ) {
882 - $ret = "'" . $s->fetch( $s ) . "'";
883 - if ( $this->numeric_version >= 8.1 ) {
884 - $ret = "E$ret";
885 - }
886 - return $ret;
 883+ return "'" . $s->fetch( $s ) . "'";
887884 }
888885 return "'" . pg_escape_string( $this->mConn, $s ) . "'";
889886 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r99562Avoid warnings from PG about improper escaping....mah20:49, 11 October 2011

Status & tagging log