Re: Can't delete role because of unknown object

From: Craig Libscomb <craiglibscomb1972(at)gmail(dot)com>
To: droletguillaume <droletguillaume(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Can't delete role because of unknown object
Date: 2014-04-22 20:19:51
Message-ID: CAABzkTjbS0U2BEz72h-V7A4E1kgC9bRH6Sp1wY+af1TO_0XMNw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Apr 22, 2014 at 3:02 PM, droletguillaume
<droletguillaume(at)gmail(dot)com>wrote:

> hi Craig,
>
> I think this thread could help you:
>
>
> http://stackoverflow.com/questions/5408156/how-to-drop-a-postgresql-database-if-there-are-active-connections-to-it
>
> Sent from Samsung Mobile
>

As far as I can tell, there are no connections open under this role. In
fact, jpate has been gone for several months

SELECT usename
FROM pg_stat_activity
GROUP BY usename;
usename
------------
postgres
log_write
product_readonly
(3 rows)

What I am looking for is something along the lines of
SELECT object_name
FROM ????
WHERE object_owner = 'jpate';

So I can see what jpate owns.

>
>
>
-------- Original message --------
> From: Craig Libscomb
> Date:04-22-2014 15:47 (GMT-05:00)
> To: pgsql-general(at)postgresql(dot)org
> Subject: [GENERAL] Can't delete role because of unknown object
>
> 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?
>
> Thanks,
> Craig
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Libscomb 2014-04-22 20:26:34 Re: Can't delete role because of unknown object
Previous Message Raymond O'Donnell 2014-04-22 20:06:24 Re: Can't delete role because of unknown object