Back to Supabase

Do I Need To Expose Security Definer Functions In Row Level Security Policies II0uOw

apps/docs/content/troubleshooting/do-i-need-to-expose-security-definer-functions-in-row-level-security-policies-iI0uOw.mdx

1.26.04449 B
Original Source

PostgREST supports 2 config parameters:

  • Exposed Schemas
  • Extra Search Path

You do not need to add your "security definer" Functions to either of these if you are using them in your Policies.

PostgREST doesn’t need to know about this function on extra search path or exposed schemas, as long as you explicitly use the schema inside RLS (e.g.: security.rls_func).