© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•13mo ago•
4 replies
okan

My RLS works for select but does not work for delete

As the title says, I have a simple RLS for profiles table as follows,

(select auth.uid()) = id
(select auth.uid()) = id


With this i can select own profile without any issues but when I want to delete it, i can't delete it. Using the following query;

const { error } = await supabase.from("profiles").delete().eq("id", userId);
const { error } = await supabase.from("profiles").delete().eq("id", userId);


If I put
true
true
for select RLS or disable it all it works. So I'm sure that it's related to this RLS.

I have some other delete RLS for other tables they work without any issues. Does anyone have any idea about the root cause of this?
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

Bucket RLS works for Insert but not Update
SupabaseSSupabase / help-and-questions
13mo ago
.insert().select() doesnt work due to rls
SupabaseSSupabase / help-and-questions
4mo ago
Select RLS for admins and users
SupabaseSSupabase / help-and-questions
5mo ago
function auth.jwt() does not exist for local RLS?
SupabaseSSupabase / help-and-questions
4y ago