mirror of
https://github.com/vrana/adminer.git
synced 2025-08-06 14:46:36 +02:00
PostgreSQL: Display description of system variables
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
## Adminer dev
|
||||
- PostgreSQL: Display auto_increment of inserted rows
|
||||
- PostgreSQL: Display description of system variables
|
||||
- CSS: Sticky table headers (bug #918)
|
||||
- IMAP: New plugin driver created for fun
|
||||
|
||||
|
@@ -1156,10 +1156,17 @@ if (!defined('Adminer\DRIVER')) {
|
||||
}
|
||||
|
||||
/** Get server variables
|
||||
* @return array [$name => $value]
|
||||
* @return array [[$name, $value]]
|
||||
*/
|
||||
function show_variables() {
|
||||
return get_key_vals("SHOW VARIABLES");
|
||||
return get_rows("SHOW VARIABLES");
|
||||
}
|
||||
|
||||
/** Get status variables
|
||||
* @return array [[$name, $value]]
|
||||
*/
|
||||
function show_status() {
|
||||
return get_rows("SHOW STATUS");
|
||||
}
|
||||
|
||||
/** Get process list
|
||||
@@ -1169,13 +1176,6 @@ if (!defined('Adminer\DRIVER')) {
|
||||
return get_rows("SHOW FULL PROCESSLIST");
|
||||
}
|
||||
|
||||
/** Get status variables
|
||||
* @return array [$name => $value]
|
||||
*/
|
||||
function show_status() {
|
||||
return get_key_vals("SHOW STATUS");
|
||||
}
|
||||
|
||||
/** Convert field in select and edit
|
||||
* @param array one element from fields()
|
||||
* @return string
|
||||
|
@@ -513,7 +513,16 @@ AND c_src.TABLE_NAME = " . q($table);
|
||||
}
|
||||
|
||||
function show_variables() {
|
||||
return get_key_vals('SELECT name, display_value FROM v$parameter');
|
||||
return get_rows('SELECT name, display_value FROM v$parameter');
|
||||
}
|
||||
|
||||
function show_status() {
|
||||
$return = array();
|
||||
$rows = get_rows('SELECT * FROM v$instance');
|
||||
foreach (reset($rows) as $key => $val) {
|
||||
$return[] = array($key, $val);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function process_list() {
|
||||
@@ -534,11 +543,6 @@ ORDER BY PROCESS
|
||||
');
|
||||
}
|
||||
|
||||
function show_status() {
|
||||
$rows = get_rows('SELECT * FROM v$instance');
|
||||
return reset($rows);
|
||||
}
|
||||
|
||||
function convert_field($field) {
|
||||
}
|
||||
|
||||
|
@@ -946,7 +946,7 @@ AND typelem = 0"
|
||||
}
|
||||
|
||||
function show_variables() {
|
||||
return get_key_vals("SHOW ALL");
|
||||
return get_rows("SHOW ALL");
|
||||
}
|
||||
|
||||
function process_list() {
|
||||
|
@@ -718,8 +718,9 @@ if (isset($_GET["sqlite"])) {
|
||||
foreach (get_rows("PRAGMA pragma_list") as $row) {
|
||||
$name = $row["name"];
|
||||
if ($name != "pragma_list" && $name != "compile_options") {
|
||||
$return[$name] = array($name, '');
|
||||
foreach (get_rows("PRAGMA $name") as $row) {
|
||||
$return[$name] .= implode(", ", $row) . "\n";
|
||||
$return[$name][1] .= implode(", ", $row) . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -729,8 +730,7 @@ if (isset($_GET["sqlite"])) {
|
||||
function show_status() {
|
||||
$return = array();
|
||||
foreach (get_vals("PRAGMA compile_options") as $option) {
|
||||
list($key, $val) = explode("=", $option, 2);
|
||||
$return[$key] = $val;
|
||||
$return[] = explode("=", $option, 2);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
@@ -9,10 +9,13 @@ if (!$variables) {
|
||||
echo "<p class='message'>" . lang('No rows.') . "\n";
|
||||
} else {
|
||||
echo "<table>\n";
|
||||
foreach ($variables as $key => $val) {
|
||||
foreach ($variables as $row) {
|
||||
echo "<tr>";
|
||||
$key = array_shift($row);
|
||||
echo "<th><code class='jush-" . JUSH . ($status ? "status" : "set") . "'>" . h($key) . "</code>";
|
||||
echo "<td>" . nl_br(h($val));
|
||||
foreach ($row as $val) {
|
||||
echo "<td>" . nl_br(h($val));
|
||||
}
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user