 grant delete on table sg_public.suggest_follower to sg_user, sg_admin;
 create policy delete_suggest_follower on sg_public.suggest_follower
   for delete to sg_user, sg_admin
-  using (id = current_setting('jwt.claims.user_id')::uuid);
+  using (id = current_setting('jwt.claims.user_id')::uuid); -- TODO comment
 
 -- TODO other functions...

grant select on table sg_public.user to sg_anonymous, sg_user, sg_admin;
create policy select_user on sg_public.user
  for select -- any user
  using (true);

-- Insert user: only anonymous, via function.
grant execute on function sg_public.sign_up(text, text, text) to sg_anonymous;

grant update on table sg_public.post to sg_user, sg_admin;
create policy update_post on sg_public.post
  for update (body, response) to sg_user
  using (user_id = current_setting('jwt.claims.user_id')::uuid); -- TODO comment
create policy update_post_admin on sg_public.post
  for update to sg_admin
  using (true); -- TODO comment

-- Delete post: admin.
grant delete on table sg_public.post to sg_admin;
create policy delete_post_admin on sg_public.post
  for delete to sg_admin
  using (true); -- TODO comment

-- Select follow: user or admin self.
grant select on table sg_public.follow to sg_user, sg_admin;
create policy select_follow on sg_public.follow
  for select to sg_user, sg_admin
  using (user_id = current_setting('jwt.claims.user_id')::uuid); -- TODO comment

-- Insert follow: user or admin via function.
-- TODO or does this need to be a function?
