Commit 24255923 authored by Matteo Beccati's avatar Matteo Beccati Committed by Marco Pivetta

[DBAL-920] Use PDO::PGSQL_ATTR_DISABLE_PREPARES by default

parent 6458b0bd
......@@ -37,15 +37,21 @@ class Driver extends AbstractPostgreSQLDriver
public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
{
try {
return new PDOConnection(
$pdo = new PDOConnection(
$this->_constructPdoDsn($params),
$username,
$password,
$driverOptions
);
if (PHP_VERSION_ID >= 50600) {
$pdo->setAttribute(\PDO::PGSQL_ATTR_DISABLE_PREPARES, true);
}
} catch (PDOException $e) {
throw DBALException::driverException($this, $e);
}
return $pdo;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment