Constraining select based on update RLS

Say I have table_a with a select rls open to everyone, but on an editor page of my app I want to check if the user actually fulfills the necessary update rls (that is more constraining) before fetching the data. I can see many ways of doing this:
  • moving the update rls logic into a procedure that I can then separately call from my app's server to check before doing a select
  • manually keeping my app's select query's filter up to date with the update rls
  • ?? doing an empty update with a select modifier
Is the last one a bad practice? Is there some other way of asking pg/sql to use the update rls for a specific select query without having to replicate the policie's logic?
Was this page helpful?