From: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | Andreas Kretschmer <andreas(at)a-kretschmer(dot)de>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Bug, Feature, or what else? |
Date: | 2013-02-08 14:49:53 |
Message-ID: | A737B7A37273E048B164557ADEF4A58B057B13AC@ntex2010a.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Andreas Kretschmer wrote:
> i have created a normal user (no superuser) akretschmer01 and another normal
> user ak02. All fine.
> The first user is the owner of the db.
>
>
> As user akretschmer01 i granted:
> db115150=> grant all on schema public to ak02;
> There are no tables or other objects createt as user ak02.
>
>
> Now i switched to user postgres (superuser):
> db115150=# drop user ak02
> db115150-# ;
> FEHLER: kann Rolle »ak02« nicht löschen, weil andere Objekte davon abhängen
> DETAIL: Privilegien für Schema public
>
> (role ak02 cannot be dropped because some objects depend on it, Detail:
> privileges for schema public)
>
> I can revoke all on database from user:
>
> db115150=# revoke all on database db115150 from ak02;
> REVOKE
> db115150=# drop user ak02;
> FEHLER: kann Rolle »ak02« nicht löschen, weil andere Objekte davon abhängen
> DETAIL: Privilegien für Schema public
>
>
> but still i can't drop the user.
>
>
> I can do that with 9.1.8 and 9.1.1 too, same problem.
>
>
> How can i drop a user as SUPERUSER (!) with all privileges?
You have to revoke the permissions that you granted.
There are two options:
db115150=# DROP OWNED BY ak02;
DROP OWNED
or
db115150=# REVOKE ALL ON SCHEMA public FROM ak02;
REVOKE
Then you can drop the user.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2013-02-08 14:52:24 | Re: Bug, Feature, or what else? |
Previous Message | Albe Laurenz | 2013-02-08 14:39:13 | Re: Decrease the time required function |
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2013-02-08 14:52:24 | Re: Bug, Feature, or what else? |
Previous Message | Виктор Егоров | 2013-02-08 14:37:34 | Re: Bug, Feature, or what else? |