pgluser tips & tricks

Here's a couple of tips for sticky situations:

Mass user removal

To drop everyone from a capability, try:

!pgluser.users_capname  mSET()
!pgluser.title_capname  mSUBST(db/dbname,db/dummy)

then run pgluser --init to override the zero-length database guard.

Alternatively, you could perhaps (this is untested) create a "killer" capability like:

!pgluser.caps           mADD(killer)
pgluser.replaces_killer capnames, to, empty
pgluser.users_killer    users, to, remove
pgluser.select_killer   select rolname from db_roles;
pgluser.create_killer   NULL
pgluser.drop_killer     NULL
Last modified 7 years ago Last modified on Apr 27, 2012, 1:50:14 PM