GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA schema_name TO username;
ALTER DATABASE name OWNER TO new_owner;
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA schema_name TO username;
GRANT privilege_list | ALL
ON table_name
TO role_name;
Code language: PostgreSQL SQL dialect and PL/pgSQL (pgsql)