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

Re: how to check objects dependency??

From: adey <adey11(at)gmail(dot)com>
To: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
Cc: "Jessica Richard" <rjessil(at)yahoo(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: how to check objects dependency??
Date: 2007-10-31 21:38:57
Message-ID: 1c66bda80710311438l72daa6cam480ee63b52f98cb7@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-admin
Doesn't ownership also apply to views and stored procs...

On 11/1/07, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> wrote:
>
> 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?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>

In response to

pgsql-admin by date

Next:From: Scott MarloweDate: 2007-10-31 21:47:28
Subject: Re: How to kill process "idle in transaction"
Previous:From: Tom LaneDate: 2007-10-31 21:30:54
Subject: Re: Upgrading from 7.2.1 to 8.x

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