Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 667149FCF19 for ; Wed, 31 Oct 2007 18:11:26 -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 21398-09 for ; Wed, 31 Oct 2007 18:10:46 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id D83EA9FD6EB for ; Wed, 31 Oct 2007 16:19:39 -0300 (ADT) Received: from alvh.no-ip.org (201-221-203-145.bk11-dsl.surnet.cl [201.221.203.145]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l9VJJeIE031867; Wed, 31 Oct 2007 12:19:40 -0700 Received: by alvh.no-ip.org (Postfix, from userid 1000) id 7000456000B; Wed, 31 Oct 2007 16:19:35 -0300 (CLST) Date: Wed, 31 Oct 2007 16:19:35 -0300 From: Alvaro Herrera To: Jessica Richard Cc: pgsql-admin@postgresql.org Subject: Re: how to check objects dependency?? Message-ID: <20071031191935.GB3984@alvh.no-ip.org> Mail-Followup-To: Jessica Richard , pgsql-admin@postgresql.org References: <906847.93368.qm@web56412.mail.re3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <906847.93368.qm@web56412.mail.re3.yahoo.com> User-Agent: Mutt/1.5.16 (2007-06-11) X-Virus-Scanned: ClamAV 0.91.1/4646/Wed Oct 31 03:41:08 2007 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Wed, 31 Oct 2007 12:19:41 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/321 X-Sequence-Number: 27235 Jessica Richard wrote: > 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? Connect to those databases and issue the command again to see the detail. When you are connected to a different database, you don't have access to the other database catalogs, thus we cannot give you the object names (only the fact that they exist). -- Alvaro Herrera Valdivia, Chile ICBM: S 39º 49' 18.1", W 73º 13' 56.4" "PHP is what I call the "Dumb Monkey" language. [A]ny dumb monkey can code something in PHP. Python takes actual thought to produce something useful." (J. Drake)