SELECT n.nspname as "Schema",
       c.relname as "Table",
       c.relacl as "Access Privileges"
FROM pg_catalog.pg_class c
     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace,
     (SELECT $1 AS cmd) AS cmd
WHERE c.relkind IN ('r', 'v', 'S')
  AND pg_catalog.pg_table_is_visible(c.oid)
  AND n.nspname !~ '^pg_'
ORDER BY 1, 2