© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
7 replies
nickreed9888

RLS on UPDATE `WITH CHECK` call function using new row data?

In the WITH CHECK part of an UPDATE when using RLS, how do I pass the incoming/new row data to a function? (or do I need to simply list every column?)
I tried
my_function(new)
my_function(new)
but get an error that "new is not a column".
my_function(*)
my_function(*)
also did not work.
My function is pretty simple (docs is the name of the table):
create or replace function public.my_function(docs) 
returns boolean as $$
begin
  return true;
end;
$$ language plpgsql security definer;
create or replace function public.my_function(docs) 
returns boolean as $$
begin
  return true;
end;
$$ language plpgsql security definer;
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

Check if row already exists with RLS.
SupabaseSSupabase / help-and-questions
4y ago
Insert row into RLS enabled table from edge function using new keys
SupabaseSSupabase / help-and-questions
7mo ago
Using json data in rls check from request
SupabaseSSupabase / help-and-questions
3y ago
Sveltekit auth helper update row (with RLS) fails without error
SupabaseSSupabase / help-and-questions
4y ago