how to change owner of a database in postgres code example
Example 1: postgresql db owner change
ALTER DATABASE target_database OWNER TO new_onwer;
Example 2: how to change owner in postgres
ALTER DATABASE name OWNER TO new_owner;
ALTER DATABASE target_database OWNER TO new_onwer;
ALTER DATABASE name OWNER TO new_owner;