See [this Supabase article](https://supabase.com/docs/guides/database/postgres/row-level-security#rls-performance-recommendations) on row level security recommendations and evaluate performance optimizations that make sense for us. Also see: - https://www.graphile.org/postgraphile/best-practices/#use-language-sql-over-language-plpgsql-where-possible - https://wiki.postgresql.org/wiki/Inlining_of_SQL_functions