From 882e9d02a032dcb0d1b16951cd2bc1c6fa23d05a Mon Sep 17 00:00:00 2001 From: Peter Knut Date: Fri, 31 Jan 2025 17:05:58 +0100 Subject: [PATCH] PostgreSQL: Fix renaming database --- adminer/drivers/pgsql.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index 3179b698..3f4852a2 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -485,7 +485,8 @@ ORDER BY connamespace, conname") as $row) { } 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)); }