What's the difference between grants and policies?...
# sql
d
What's the difference between grants and policies? Would something like
Copy code
create policy write on table for insert with check (true);
be equivalent to
Copy code
grant insert on table
? I noticed the examples used the former so I was wondering why not the latter.
b
Grants are at the table level, policies (RLS) are at the row level, so policies are more flexible and can also use complex SQL where as grants are basically just giving a role access to a table.