Re: how to check objects dependency??

From: Jessica Richard <rjessil(at)yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: how to check objects dependency??
Date: 2007-11-02 12:50:20
Message-ID: 365368.53951.qm@web56411.mail.re3.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Instead of using drop user username, I used drop user "username" with double quotes, then the error message told me more detail about a specific user defined function. Then I was able to drop that function, then drop this user.

My next question,

How do I check the ownership of the functions. I can't tell the difference between system functions and the user defined functions.

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.

Thanks a lot,
Jessica

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote: 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

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message dx k9 2007-11-02 14:11:28 jumpstart - pgsql.v824
Previous Message Rodrigo De León 2007-11-02 08:42:31 Re: How many connections are in use?