Re: [SOLVED] Can't delete role because of unknown object

From: Craig Libscomb <craiglibscomb1972(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [SOLVED] Can't delete role because of unknown object
Date: 2014-04-22 21:01:28
Message-ID: CAABzkThiyb8VG+m265E+xXdrOdTa0FeH=UvJzHaP_T7MVPbR2g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Apr 22, 2014 at 3:30 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Craig Libscomb <craiglibscomb1972(at)gmail(dot)com> writes:
> > The following command:
> > DROP USER IF EXISTS jpate;
>
> > generates the following output:
> > ERROR: role "jpate" cannot be dropped because some objects depend on it
> > DETAIL: 1 object in database products
>
> > It would be most helpful to know what object in the products database
> > depends on the jpate role, but I am unable to find anything that even
> > begins to offer a clue. What command will show me this mysterious object,
> > please?
>
> You need to connect to that database and try the DROP USER from there.
> It's not possible to produce very much info about the problematic
> object when not connected to its database. (I suppose we could tell
> you the object kind, ie table/function/etc, but not more than that.)

*sigh*, yep, I was connected to the wrong database. After connecting
the error told me the dependency was privileges on the public schema.
REVOKEing those then allowed me to DROP the user.

Thanks!

>
>
> regards, tom lane

Browse pgsql-general by date

  From Date Subject
Next Message Craig Libscomb 2014-04-22 21:05:22 Re: Can't delete role because of unknown object
Previous Message Igor Neyman 2014-04-22 20:39:04 Re: Can't delete role because of unknown object