(experimental) DBMS-side functions for checking permissions