Skip site navigation (1) Skip section navigation (2)

Re: how to check objects dependency??

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Jessica Richard" <rjessil(at)yahoo(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: how to check objects dependency??
Date: 2007-10-31 16:04:45
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
On 10/31/07, Jessica Richard <rjessil(at)yahoo(dot)com> 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?

What version of pgsql are you running?  In 8.2 I get a more useful
error message for a table that is owned by a user, i.e.:

ERROR: role ... cannot be dropped ...
DETAIL: owner of table <tablename>

Have you looked in the logs to see if something like that shows up in them?

In response to


pgsql-admin by date

Next:From: Kevin GrittnerDate: 2007-10-31 16:31:12
Subject: Re: initdb: could not create directory "C:/ProgramFiles" (was: Installing PostgreSQL as Admin)
Previous:From: Scott MarloweDate: 2007-10-31 15:07:16
Subject: Re: Postgresql Database Corrupted

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group