FeatureFuel
3

Cannot add a "user" column with RLS

Source: supabase/supabase#32910 · opened by @code3z
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 named user_id. I get that there's some postgres use for the USER variable, but I feel like there should be a better UX for when people make this mistake.

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests