From be74f89d550b5e804ee7e2b571332387ecc1c93d Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Tue, 18 Sep 2018 16:11:35 +0300 Subject: [PATCH] Always use emulate_prepares --- DatabasePdoPgsql.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/DatabasePdoPgsql.php b/DatabasePdoPgsql.php index 5cb64fd..445ef25 100644 --- a/DatabasePdoPgsql.php +++ b/DatabasePdoPgsql.php @@ -3,7 +3,7 @@ /** * PDO/PostgreSQL wrapper with (mostly) DatabaseMySQL interface :) * Select builder is inspired by MediaWiki's one. - * Version: 2018-08-12 + * Version: 2018-09-18 * (c) Vitaliy Filippov, 2015-2018 */ @@ -38,7 +38,7 @@ if (!interface_exists('Database')) class DatabasePdoPgsql implements Database { - var $host, $port, $socket, $username, $password, $dbname, $pgbouncer; + var $host, $port, $socket, $username, $password, $dbname; var $tableNames = array(); var $init = array(); @@ -84,7 +84,6 @@ class DatabasePdoPgsql implements Database 'queryLogFile' => '', 'autoBegin' => false, 'ondestroy' => 'commit', - 'pgbouncer' => false, 'init' => array(), ); $options += $defOpts; @@ -117,7 +116,7 @@ class DatabasePdoPgsql implements Database $this->link = new PDO($str, $this->username, $this->password, array( PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, - PDO::ATTR_EMULATE_PREPARES => !empty($this->pgbouncer), + PDO::ATTR_EMULATE_PREPARES => true, )); foreach ($this->init as $q) $this->link->query($q);