RLS select is filtering rows by the column contact_deleted... so I can't so updates to that column? #7908
malalecherocks
started this conversation in
General
Replies: 1 comment 13 replies
-
What are your update RLS policies? You would need using policy (on the current row) to not check for contact_deleted. The with check policy could be the same (it defaults to the same if not specified) as you are modifying the contact_deleted value. If it is the select policy, then setting "returning minimal" would not do the select: |
Beta Was this translation helpful? Give feedback.
13 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Imagine we have a table called contact that has a column contact_deleted and in RLS SELECT we establish the rule that only allows contact_deleted = false
this way when our users do select it will only return rows of the contacts that haven't been deleted.
My problem is that when I try to do an UPDATE to establish the column contact_deleted to true, it gives me an error, it doesn't allow me to update it because as far as I read updates depends on selects.
I came to the conclusion that what I was trying to do is not possible, is that correct? Or maybe I was doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions