|
|
|
|
|
by steve-chavez
1126 days ago
|
|
> because Postgres will check the security for all rows before filtering on the joins, doing anything with WHERE clauses, doing anything to even tentatively take LIMIT into account, etc. Note that the above only happens for non-inlinable[1] functions used inside RLS policies. Going from what you mentioned below, it seems your main problem are SECURITY DEFINER functions, which aren't inlinable. It's possible to avoid using SECURITY DEFINER, but that's highly application-specific. [1]:https://wiki.postgresql.org/wiki/Inlining_of_SQL_functions#I... |
|