Re: Can't delete role because of unknown object
От | Igor Neyman |
---|---|
Тема | Re: Can't delete role because of unknown object |
Дата | |
Msg-id | A76B25F2823E954C9E45E32FA49D70EC7AC39FE2@mail.corp.perceptron.com обсуждение исходный текст |
Ответ на | Re: Can't delete role because of unknown object (Craig Libscomb <craiglibscomb1972@gmail.com>) |
Список | pgsql-general |
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Craig Libscomb Sent: Tuesday, April 22, 2014 4:27 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Can't delete role because of unknown object On Tue, Apr 22, 2014 at 3:06 PM, Raymond O'Donnell <rod@iol.ie> wrote: On 22/04/2014 20:47, Craig Libscomb wrote: > 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? I'd hazard a guess that there is another role which is a member of this one.... connect to the database using psql, and then \du will give you a list of all roles - in the output from \du, look at the column "Member of". All of the roles have {} under "member of", so I assume that means no members? HTH, Ray. You could try: SELECT C.relname, C.reltype FROM pg_class C, pg_authid O WHERE O.rolname = 'jpate' AND C.relowner = O.oid; Regards, Igor Neyman
В списке pgsql-general по дате отправления: