From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | Andreas Kretschmer <andreas(at)a-kretschmer(dot)de> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Bug, Feature, or what else? |
Date: | 2013-02-08 15:38:02 |
Message-ID: | 51151BDA.2090101@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On 02/08/2013 07:23 AM, Andreas Kretschmer wrote:
>
>
> Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> hat am 8. Februar 2013 um 16:19
> geschrieben:
>> On 02/08/2013 06:58 AM, Andreas Kretschmer wrote:
>>>
>>>>> How can i drop a user as SUPERUSER (!) with all privileges?
>>>>
>>>> I believe you will need to REVOKE ALL ON SCHEMA public FROM ak02.
>>>
>>>
>>> doesn't help:
>>>
>>> -bash-4.1$ psql -U postgres db115150
>>> psql (9.1.8)
>>> Type "help" for help.
>>>
>>> db115150=# begin;
>>> BEGIN
>>> db115150=# revoke all on schema public 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
>>> db115150=#
>>>
>>>
>>
>> So what does \dn+ public show?
>
> db115150=# \dn+ public
> List of schemas
> Name | Owner | Access privileges | Description
> --------+----------+-----------------------------+------------------------
> public | postgres | postgres=UC/postgres +| standard public schema
> | | akretschmer01=U*C*/postgres+|
> | | ak02=UC/akretschmer01 |
> (1 row)
>
>
If I am following the Notes section correctly in:
http://www.postgresql.org/docs/9.1/interactive/sql-revoke.html
"If a superuser chooses to issue a GRANT or REVOKE command, the command
is performed as though it were issued by the owner of the affected
object. Since all privileges ultimately come from the object owner
(possibly indirectly via chains of grant options), it is possible for a
superuser to revoke all privileges, but this might require use of
CASCADE as stated above."
Try:
revoke all on schema public from ak02 cascade;
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2013-02-08 15:41:32 | Re: Visual query builder for PosgreSQL? |
Previous Message | Kevin Grittner | 2013-02-08 15:33:18 | Re: Visual query builder for PosgreSQL? |
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Kretschmer | 2013-02-08 15:45:34 | Re: Bug, Feature, or what else? |
Previous Message | Magnus Hagander | 2013-02-08 15:32:50 | Re: Considering Gerrit for CFs |