grant all permission to a db user postgres code example
Example 1: grant all privileges database postgres to user
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA schema_name TO username;
Example 2: list all permissions on a table in postgres
SELECT grantee, privilege_type
FROM information_schema.role_table_grants
WHERE table_name='mytable'