Pg Role
main tips stats roles

GRANTS di una tabella

\c <database>
\dp <tabella>
\c MNP  
\prompt 'Table name? ' tabella
select a.tablename,b.usename,HAS_TABLE_PRIVILEGE(usename,tablename, 'select') as select,
  HAS_TABLE_PRIVILEGE(usename,tablename, 'insert') as insert,
  HAS_TABLE_PRIVILEGE(usename,tablename, 'update') as update,
  HAS_TABLE_PRIVILEGE(usename,tablename, 'delete') as delete, 
  HAS_TABLE_PRIVILEGE(usename,tablename, 'references') as references  from pg_tables a , pg_user b 
where a.tablename= :'tabella';

DDL

Ruoli (utenti)

pg_dumpall  -U enterprisedb -r -f roles.ddl

Droppare un ruolo

\c <database>
reassign owned by <rolename> to <other_rolename>;
revoke all privileges on all tables in schema public from <rolename>;
drop role <rolename>;
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License