diff --git a/adminer/drivers/mysql.inc.php b/adminer/drivers/mysql.inc.php
index 786045455..3b4becd99 100644
--- a/adminer/drivers/mysql.inc.php
+++ b/adminer/drivers/mysql.inc.php
@@ -902,6 +902,13 @@ function show_variables() {
return get_key_vals("SHOW VARIABLES");
}
+ /** Get process list
+ * @return array ($row)
+ */
+ function process_list() {
+ return get_rows("SHOW FULL PROCESSLIST");
+ }
+
/** Get status variables
* @return array ($name => $value)
*/
@@ -910,7 +917,7 @@ function show_status() {
}
/** Check whether a feature is supported
- * @param string "comment", "copy", "drop_col", "dump", "event", "partitioning", "privileges", "procedure", "processlist", "routine", "scheme", "sequence", "status", "trigger", "type", "variables", "view"
+ * @param string "comment", "copy", "drop_col", "dump", "event", "kill", "partitioning", "privileges", "procedure", "processlist", "routine", "scheme", "sequence", "status", "trigger", "type", "variables", "view"
* @return bool
*/
function support($feature) {
diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php
index 42f5a1a78..c32c1adf5 100644
--- a/adminer/drivers/pgsql.inc.php
+++ b/adminer/drivers/pgsql.inc.php
@@ -545,12 +545,16 @@ function use_sql($database) {
function show_variables() {
return get_key_vals("SHOW ALL");
}
+
+ function process_list() {
+ return get_rows("SELECT * FROM pg_stat_activity ORDER BY procpid");
+ }
function show_status() {
}
function support($feature) {
- return ereg('^(comment|view|scheme|sequence|trigger|type|variables|drop_col)$', $feature); //! routine|
+ return ereg('^(comment|view|scheme|processlist|sequence|trigger|type|variables|drop_col)$', $feature); //! routine|
}
$jush = "pgsql";
diff --git a/adminer/processlist.inc.php b/adminer/processlist.inc.php
index aac3f5022..96eff8ad6 100644
--- a/adminer/processlist.inc.php
+++ b/adminer/processlist.inc.php
@@ -1,5 +1,5 @@
$row) {
+foreach (process_list() as $i => $row) {
if (!$i) {
- echo " \n";
+ echo " " . implode(" ", array_keys($row)) . " " . (support("kill") ? " \n";
}
- echo " " : "") . " " . implode(" ", array_keys($row)) . "
" . shorten_utf8($val, 100, "
") . ' ' . lang('Edit') . '' : nbsp($val));
+ echo "" . shorten_utf8($val, 100, "
") . ' ' . lang('Edit') . '' : nbsp($val));
}
echo "\n";
}
?>
-result("SELECT @@max_connections")); ?>
- +result("SELECT @@max_connections")); + echo "
\n"; +} +?> diff --git a/changes.txt b/changes.txt index 7823841e7..700d68d38 100644 --- a/changes.txt +++ b/changes.txt @@ -1,3 +1,6 @@ +Adminer 3.3.1-dev: +Process list (PostgreSQL) + Adminer 3.3.0 (released 2011-07-19): Use Esc to disable in-place edit Shortcut for database privileges