Postgres::alterDatabaseOwner PHP Method

alterDatabaseOwner() public method

Changes ownership of a database This can only be done by a superuser or the owner of the database
public alterDatabaseOwner ( string $dbName, string $newOwner ) : integer
$dbName string database to change ownership of
$newOwner string user that will own the database
return integer 0 on success
    function alterDatabaseOwner($dbName, $newOwner)
    {
        $this->fieldClean($dbName);
        $this->fieldClean($newOwner);
        $sql = "ALTER DATABASE \"{$dbName}\" OWNER TO \"{$newOwner}\"";
        return $this->execute($sql);
    }
Postgres