From: Jessica Richard <rjessil@yahoo.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: how to check objects dependency??
Date: Fri, 2 Nov 2007 05:50:20 -0700 (PDT)
Message-ID: <365368.53951.qm@web56411.mail.re3.yahoo.com> (raw)
In-Reply-To: <18966.1193860699@sss.pgh.pa.us>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: rjessil@yahoo.com, tgl@sss.pgh.pa.us
Subject: Re: how to check objects dependency??
In-Reply-To: <365368.53951.qm@web56411.mail.re3.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox