Cannot add a "user" column with RLS #32910
Unanswered
code3z
asked this question in
Feature Requests
Replies: 1 comment
-
I changed your category to feature request. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a table where each row is connected to a user, and I thought the obvious name to name the user id column was "user"
Then I put in an RLS policy allowing users to edit their own data. At first it rejected the policy with some error that I couldn't understand, so I casted the user type to uuid and it worked. Then I got confusing errors like
invalid input syntax for type uuid: "authenticated"
It took a while to figure out that the column could not be named
user
and had to be nameduser_id
. I get that there's some postgres use for theUSER
variable, but I feel like there should be a better UX for when people make this mistake.Beta Was this translation helpful? Give feedback.
All reactions