mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 10:04:07 +02:00
PostgreSQL, Oracle: Set schema for EXPLAIN queries in SQL command (bug #706)
This commit is contained in:
@@ -986,9 +986,10 @@ if (!defined("DRIVER")) {
|
||||
|
||||
/** Set current schema
|
||||
* @param string
|
||||
* @param Min_DB
|
||||
* @return bool
|
||||
*/
|
||||
function set_schema($schema) {
|
||||
function set_schema($schema, $connection2 = null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -367,9 +367,12 @@ AND c_src.TABLE_NAME = " . q($table);
|
||||
return $connection->result("SELECT sys_context('USERENV', 'SESSION_USER') FROM dual");
|
||||
}
|
||||
|
||||
function set_schema($scheme) {
|
||||
function set_schema($scheme, $connection2 = null) {
|
||||
global $connection;
|
||||
return $connection->query("ALTER SESSION SET CURRENT_SCHEMA = " . idf_escape($scheme));
|
||||
if (!$connection2) {
|
||||
$connection2 = $connection;
|
||||
}
|
||||
return $connection2->query("ALTER SESSION SET CURRENT_SCHEMA = " . idf_escape($scheme));
|
||||
}
|
||||
|
||||
function show_variables() {
|
||||
|
@@ -689,9 +689,12 @@ AND typelem = 0"
|
||||
return $connection->result("SELECT current_schema()");
|
||||
}
|
||||
|
||||
function set_schema($schema) {
|
||||
function set_schema($schema, $connection2 = null) {
|
||||
global $connection, $types, $structured_types;
|
||||
$return = $connection->query("SET search_path TO " . idf_escape($schema));
|
||||
if (!$connection2) {
|
||||
$connection2 = $connection;
|
||||
}
|
||||
$return = $connection2->query("SET search_path TO " . idf_escape($schema));
|
||||
foreach (types() as $type) { //! get types from current_schemas('t')
|
||||
if (!isset($types[$type])) {
|
||||
$types[$type] = 0;
|
||||
|
Reference in New Issue
Block a user