Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U3q1k-0004a4-C9 for pgsql-general@arkaria.postgresql.org; Fri, 08 Feb 2013 15:38:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U3q1j-0003S1-DT for pgsql-general@arkaria.postgresql.org; Fri, 08 Feb 2013 15:38:11 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U3q1i-0003Rw-EX for pgsql-general@postgresql.org; Fri, 08 Feb 2013 15:38:10 +0000 Received: from ie-in-x0233.1e100.net ([2607:f8b0:4001:c03::233] helo=mail-ie0-x233.google.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U3q1f-0000mZ-G2 for pgsql-general@postgresql.org; Fri, 08 Feb 2013 15:38:09 +0000 Received: by mail-ie0-f179.google.com with SMTP id k11so5112601iea.38 for ; Fri, 08 Feb 2013 07:38:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=fV+9faue3wbekF9URrZYL4WMLOCOUcNPqLwr2DIOWXQ=; b=RGTJrVCGz4/wZzfDhqOF98hlhacO+vfawfVaPHiJItiIN4GxMpwxR+vrukplQW1AgX SuRwlFOP/UQXrWtqBwWjIMtL4KltPGhPE5wn1fGOPcyzp4qRoh+P6digKZ5okc5CUCOn KvZtq0ZZmW8MOhweSjIs803koKCv8SNVGm8yBOxRzKz4G81x8ZUqoH4aU/6SRlmWniLa BxQtgBgc2Ulpfshud+a6egeerDNi8AVYP0JZTKf8dfJ0F8a2bopLKn0nS3Stt9FaIdh1 V7Ash467gCGD4rp0RLqp8Lhh1dZwalKH7cqXZslzhImfoudZq6aLoMWlWkHwzoF0k2Er snRg== X-Received: by 10.50.170.66 with SMTP id ak2mr3202210igc.38.1360337885914; Fri, 08 Feb 2013 07:38:05 -0800 (PST) Received: from [192.168.0.2] (c-24-17-164-54.hsd1.wa.comcast.net. [24.17.164.54]) by mx.google.com with ESMTPS id mj6sm14519145igc.9.2013.02.08.07.38.03 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 Feb 2013 07:38:04 -0800 (PST) Message-ID: <51151BDA.2090101@gmail.com> Date: Fri, 08 Feb 2013 07:38:02 -0800 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Andreas Kretschmer CC: "pgsql-general@postgresql.org" Subject: Re: Bug, Feature, or what else? References: <119745304.24731.1360333559327.JavaMail.open-xchange@ox.ims-firmen.de> <51151128.8040807@gmail.com> <1568445490.24920.1360335539088.JavaMail.open-xchange@ox.ims-firmen.de> <51151764.4090405@gmail.com> <609013460.25018.1360337038276.JavaMail.open-xchange@ox.ims-firmen.de> In-Reply-To: <609013460.25018.1360337038276.JavaMail.open-xchange@ox.ims-firmen.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org On 02/08/2013 07:23 AM, Andreas Kretschmer wrote: > > > Adrian Klaver 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.klaver@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general