How to GRANT a ROLE to another.
Useful on RDS where the postgres ROLE is not a superuser and it needs to be a member of another role before it can run ALTER DEFAULT PRIVILEGES on a database owned by that role.
ALTER TABLE users ADD CONSTRAINT enforce_single_not_null_column CHECK(
(CAST(parent_id IS NOT NULL AS int) +
CAST(teacher_id IS NOT NULL AS int)) <= 1)