Commit 828325da authored by rocksfrow's avatar rocksfrow

added additional comments explaining client_encoding support as requested

parent 5a4c0f2f
...@@ -53,7 +53,10 @@ class Driver extends AbstractPostgreSQLDriver ...@@ -53,7 +53,10 @@ class Driver extends AbstractPostgreSQLDriver
$pdo->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES, true); $pdo->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES, true);
} }
/* define charset via SET NAMES to avoid inconsistent DSN support */ /* defining client_encoding via SET NAMES to avoid inconsistent DSN support
* - the 'client_encoding' connection param only works with postgres >= 9.1
* - also, padding client_encoding via the 'options' param breaks pgbouncer support
*/
if (isset($params['charset'])) { if (isset($params['charset'])) {
$pdo->query('SET NAMES \''.$params['charset'].'\''); $pdo->query('SET NAMES \''.$params['charset'].'\'');
} }
......
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