Checks · DB-010
DB-010 · security definer function without search_path
P1 Needs attentionWhy it matters
A definer function with a loose search path can be tricked into running a different function than the one you wrote.
How we detect it
SQL functions marked security definer without a fixed search_path.
How we fix it
Set search_path to empty on the function and schema-qualify every call.
Can it be fixed automatically? Yes, with a template change