diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php index 9571b108b..de6fb8761 100755 --- a/classes/database/Postgres.php +++ b/classes/database/Postgres.php @@ -646,11 +646,13 @@ function alterDatabase($dbName, $newName, $newOwner = '', $comment = '') { } } - $status = $this->alterDatabaseOwner($newName, $newOwner); - if ($status != 0) { - $this->rollbackTransaction(); - return -2; - } + if ($newOwner != '') { + $status = $this->alterDatabaseOwner($newName, $newOwner); + if ($status != 0) { + $this->rollbackTransaction(); + return -2; + } + } if (trim($comment) != '' ) { $status = $this->setComment('DATABASE', $dbName, '', $comment);