Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id B99FD9FA00B for ; Wed, 31 Oct 2007 18:40:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 85461-04-4 for ; Wed, 31 Oct 2007 18:39:35 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id B6CAF9F9B63 for ; Wed, 31 Oct 2007 16:58:21 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l9VJwJKu018967; Wed, 31 Oct 2007 15:58:20 -0400 (EDT) To: Jessica Richard cc: pgsql-admin@postgresql.org Subject: Re: how to check objects dependency?? In-reply-to: <906847.93368.qm@web56412.mail.re3.yahoo.com> References: <906847.93368.qm@web56412.mail.re3.yahoo.com> Comments: In-reply-to Jessica Richard message dated "Wed, 31 Oct 2007 07:50:51 -0700" Date: Wed, 31 Oct 2007 15:58:19 -0400 Message-ID: <18966.1193860699@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/322 X-Sequence-Number: 27236 Jessica Richard 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