CREATE DATABASE database_name;
GRANT ALL PRIVILEGES ON DATABASE database_name TO user_name;
ALTER DATABASE database_name
OWNER TO new_user;
ALTER DATABASE database_name
RENAME TO new_name;
begin;
rollback;
savepoint point_name;
rollback to point_name; (Then you can commit until the savepoint)
end transaction;
commit; (end transaction and commit both are same)