Group: pgsql.admin


Subject: how to check objects dependency??
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 10/31/2007 3:58:19 PM
Jessica Richard <rjessil@yahoo.com> writes: > I am trying to drop a user but it complained with the following message: > ERROR: role "joe" cannot be dropped because some objects depend on it > DETAIL: 1 objects in database Jan_test > 1 objects in database Jan > this user does not own any tables in those two databases. Is there any command I can use to check all the dependencies on this user? Try to do the DROP ROLE within those databases. You'll get more detail about owned objects within the current database, but from outside that database the info isn't reachable ... regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly

Subject: how to check objects dependency??
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 11/2/2007 11:15:02 AM
Jessica Richard <rjessil@yahoo.com> writes: > I am sure in the future there will be times that I need to check the ownership of the functions but not allowed to drop users to see check the dependencies. There's no need for a separate operation for that. Do begin; drop user foo; rollback; regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster