alter table owner postgres code example
Example 1: how to change owner in postgres
ALTER DATABASE name OWNER TO new_owner;
Example 2: postgres alter table owner
ALTER TABLE <tablename> OWNER TO <username>
ALTER DATABASE name OWNER TO new_owner;
ALTER TABLE <tablename> OWNER TO <username>