© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
14 replies
jdgamble555

Simple RLS Policy with Join

I would think this would work:
(role() = 'authenticated'::text) AND (authorId.id = uuid())
(role() = 'authenticated'::text) AND (authorId.id = uuid())

Here
authorId
authorId
is a FK to
profiles.id
profiles.id
. I simply want to make sure a user can't insert a post where the author is someone else.

I get column "authorId" does not exist when trying to create the policy, but it does exist. It is an fk field.

J
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

RLS Policy With Join
SupabaseSSupabase / help-and-questions
4y ago
Writing RLS policy with join
SupabaseSSupabase / help-and-questions
4y ago
RLS policy with join not working
SupabaseSSupabase / help-and-questions
4y ago
RLS Policy
SupabaseSSupabase / help-and-questions
4mo ago