mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 07:36:44 +02:00
- PostgreSQL: Avoid warning about crdb_version (fix #924, regression from 5.0.5)
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
## Adminer dev
|
## Adminer dev
|
||||||
- PostgreSQL: Display auto_increment of inserted rows
|
- PostgreSQL: Display auto_increment of inserted rows
|
||||||
- PostgreSQL: Display description of system variables
|
- PostgreSQL: Display description of system variables
|
||||||
|
- PostgreSQL: Avoid warning about crdb_version (bug #924, regression from 5.0.5)
|
||||||
- CSS: Sticky table headers (bug #918)
|
- CSS: Sticky table headers (bug #918)
|
||||||
- IMAP: New plugin driver created for fun
|
- IMAP: New plugin driver created for fun
|
||||||
|
|
||||||
|
@@ -35,8 +35,6 @@ if (isset($_GET["pgsql"])) {
|
|||||||
}
|
}
|
||||||
restore_error_handler();
|
restore_error_handler();
|
||||||
if ($this->link) {
|
if ($this->link) {
|
||||||
$version = pg_version($this->link);
|
|
||||||
$this->server_info = $version["server"];
|
|
||||||
pg_set_client_encoding($this->link, "UTF8");
|
pg_set_client_encoding($this->link, "UTF8");
|
||||||
}
|
}
|
||||||
return (bool) $this->link;
|
return (bool) $this->link;
|
||||||
@@ -334,8 +332,7 @@ if (isset($_GET["pgsql"])) {
|
|||||||
if (min_version(9, 0, $connection)) {
|
if (min_version(9, 0, $connection)) {
|
||||||
$connection->query("SET application_name = 'Adminer'");
|
$connection->query("SET application_name = 'Adminer'");
|
||||||
}
|
}
|
||||||
$crdb_version = $connection->result("SHOW crdb_version");
|
$connection->server_info = $connection->result("SELECT version()");
|
||||||
$connection->server_info .= ($crdb_version ? "-" . preg_replace('~ \(.*~', '', $crdb_version) : "");
|
|
||||||
$connection->cockroach = preg_match('~CockroachDB~', $connection->server_info);
|
$connection->cockroach = preg_match('~CockroachDB~', $connection->server_info);
|
||||||
if ($connection->cockroach) { // we don't use "PostgreSQL / CockroachDB" by default because it's too long
|
if ($connection->cockroach) { // we don't use "PostgreSQL / CockroachDB" by default because it's too long
|
||||||
$drivers[DRIVER] = "CockroachDB";
|
$drivers[DRIVER] = "CockroachDB";
|
||||||
|
@@ -128,7 +128,7 @@ function min_version($version, $maria_db = "", $connection2 = null) {
|
|||||||
$server_info = $match[1];
|
$server_info = $match[1];
|
||||||
$version = $maria_db;
|
$version = $maria_db;
|
||||||
}
|
}
|
||||||
return $version && version_compare($server_info, $version) >= 0;
|
return $version && version_compare(preg_replace('~^\D+~', '', $server_info), $version) >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get connection charset
|
/** Get connection charset
|
||||||
|
Reference in New Issue
Block a user