DeleteDBUser

From GombeMIWiki
Revision as of 13:40, 29 September 2015 by KarlPinc (talk | contribs) (New page)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Deleting a Database User

There is no web page for deleting a database user. Deletion must be done with SQL statements by a user with administrative privileges.

Listing All Users

The following query lists all users and groups:

select rolname as "user/group"
     , rolsuper as administrator
  from pg_roles
  order by rolname;

Deleting a User

Before deleting a user the user's schemas must be deleted. Since administrative users do not usually have their own private schemas, schema deletion need only be done for regular users.

First connect to the gombemi_test database, as an administrative user.

drop schema SOMEUSER cascade;

Then connect to the gombemi database, as an administrative user.

drop schema SOMEUSER cascade;
drop role SOMEUSER;