1. select tablename,
    2. HAS_TABLE_PRIVILEGE(tablename, 'select') as select,
    3. HAS_TABLE_PRIVILEGE(tablename, 'insert') as insert,
    4. HAS_TABLE_PRIVILEGE(tablename, 'update') as update,
    5. HAS_TABLE_PRIVILEGE(tablename, 'delete') as delete,
    6. HAS_TABLE_PRIVILEGE(tablename, 'references') as references
    7. from pg_tables where schemaname='public' order by tablename;

    以前记下的,出处忘了