1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-17 20:01:25 +02:00

PostgreSQL: Fix renaming database

This commit is contained in:
Peter Knut
2025-01-31 17:05:58 +01:00
committed by Jakub Vrana
parent e346f47384
commit 882e9d02a0

View File

@@ -485,7 +485,8 @@ ORDER BY connamespace, conname") as $row) {
} }
function rename_database($name, $collation) { function rename_database($name, $collation) {
//! current database cannot be renamed global $connection;
$connection->close();
return queries("ALTER DATABASE " . idf_escape(DB) . " RENAME TO " . idf_escape($name)); return queries("ALTER DATABASE " . idf_escape(DB) . " RENAME TO " . idf_escape($name));
} }