Re: how to check objects dependency?? - Mailing list pgsql-admin

From Jessica Richard
Subject Re: how to check objects dependency??
Date
Msg-id 365368.53951.qm@web56411.mail.re3.yahoo.com
Whole thread Raw
In response to Re: how to check objects dependency??  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: how to check objects dependency??  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: how to check objects dependency??  (Alvaro Herrera <alvherre@commandprompt.com>)
List 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@sss.pgh.pa.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

pgsql-admin by date:

Previous
From: "Rodrigo De León"
Date:
Subject: Re: How many connections are in use?
Next
From: dx k9
Date:
Subject: jumpstart - pgsql.v824