Anyone have a good article or video on Column Leve...
# help
w
Anyone have a good article or video on Column Level Security? I am a SQL newbie but want to open up reading permissions on a specific column. Bonus points if it is through the supabase cloud UI.
g
You won't do it with the UI except for the SQL editor... I like this article for overall view: https://www.enterprisedb.com/postgres-tutorials/how-implement-column-and-row-level-security-postgresql You can also search here in Discord for column level security as it has been brought up before
w
That article is linked a couple of times. But I'm having trouble understanding it. I'll search Discord. Thanks for the tip.
g
Yeah, I'm not bought in actually on doing the role based column security built into postgresql, at least with supabase user types. I think either a view with only the columns you want (mentioned in that article and elsewhere) or an rpc function returning a table with only the columns you want is the way to go....
With rpc you lock down the table with RLS and then use a security definer function to only return the columns you want (and do your query, user roles, etc in the function).