mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 23:57:29 +02:00
PostgreSQL PDO: Support PgBouncer, unsupport PostgreSQL < 9.1 (bug #771)
This commit is contained in:
@@ -150,8 +150,7 @@ if (isset($_GET["pgsql"])) {
|
||||
function connect($server, $username, $password) {
|
||||
global $adminer;
|
||||
$db = $adminer->database();
|
||||
$string = "pgsql:host='" . str_replace(":", "' port='", addcslashes($server, "'\\")) . "' options='-c client_encoding=utf8'";
|
||||
$this->dsn("$string dbname='" . ($db != "" ? addcslashes($db, "'\\") : "postgres") . "'", $username, $password);
|
||||
$this->dsn("pgsql:host='" . str_replace(":", "' port='", addcslashes($server, "'\\")) . "' client_encoding=utf8 dbname='" . ($db != "" ? addcslashes($db, "'\\") : "postgres") . "'", $username, $password); //! client_encoding is supported since 9.1 but we can't yet use min_version here
|
||||
//! connect without DB in case of an error
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user