postgresql : ERROR: function connection_id() does not exist
This commit is contained in:
parent
6860478950
commit
86e26846a8
|
@ -1019,6 +1019,10 @@ if (!defined("DRIVER")) {
|
||||||
return queries("KILL " . number($val));
|
return queries("KILL " . number($val));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function connection_id(){
|
||||||
|
return "SELECT CONNECTION_ID()";
|
||||||
|
}
|
||||||
|
|
||||||
function max_connections() {
|
function max_connections() {
|
||||||
global $connection;
|
global $connection;
|
||||||
return $connection->result("SELECT @@max_connections");
|
return $connection->result("SELECT @@max_connections");
|
||||||
|
|
|
@ -638,6 +638,10 @@ AND typelem = 0"
|
||||||
return queries("SELECT pg_terminate_backend(" . number($val).")");
|
return queries("SELECT pg_terminate_backend(" . number($val).")");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function connection_id(){
|
||||||
|
return "SELECT pg_backend_pid()";
|
||||||
|
}
|
||||||
|
|
||||||
function max_connections() {
|
function max_connections() {
|
||||||
global $connection;
|
global $connection;
|
||||||
return $connection->result("SHOW max_connections");
|
return $connection->result("SHOW max_connections");
|
||||||
|
|
|
@ -1215,7 +1215,7 @@ function slow_query($query) {
|
||||||
$db = $adminer->database();
|
$db = $adminer->database();
|
||||||
$timeout = $adminer->queryTimeout();
|
$timeout = $adminer->queryTimeout();
|
||||||
if (support("kill") && is_object($connection2 = connect()) && ($db == "" || $connection2->select_db($db))) {
|
if (support("kill") && is_object($connection2 = connect()) && ($db == "" || $connection2->select_db($db))) {
|
||||||
$kill = $connection2->result("SELECT CONNECTION_ID()"); // MySQL and MySQLi can use thread_id but it's not in PDO_MySQL
|
$kill = $connection2->result(connection_id()); // MySQL and MySQLi can use thread_id but it's not in PDO_MySQL
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var timeout = setTimeout(function () {
|
var timeout = setTimeout(function () {
|
||||||
|
|
Loading…
Reference in a new issue