Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1elA22-0008Bi-NC for pgsql-general@arkaria.postgresql.org; Mon, 12 Feb 2018 09:04:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1elA21-0001J3-Rn for pgsql-general@arkaria.postgresql.org; Mon, 12 Feb 2018 09:04:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1elA21-0001It-KG for pgsql-general@lists.postgresql.org; Mon, 12 Feb 2018 09:04:13 +0000 Received: from aragorn.net-wizard.org ([138.201.127.29] helo=gandalf.net-wizard.org) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1elA1t-0001WB-B0 for pgsql-general@postgresql.org; Mon, 12 Feb 2018 09:04:12 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.net-wizard.org (Postfix) with ESMTP id 5F2F1803CD; Mon, 12 Feb 2018 10:04:02 +0100 (CET) X-Virus-Scanned: Gentoo amavisd-new at aragorn Received: from aragorn.net-wizard.org ([127.0.0.1]) by localhost (aragorn.net-wizard.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fnEkJ9Bw_kef; Mon, 12 Feb 2018 10:03:54 +0100 (CET) Received: from MTEC0211 (mtec-lee-dock-2-133.ethz.ch [129.132.6.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: clavadetscher@swisspug.org) by gandalf.net-wizard.org (Postfix) with ESMTPSA id 92F94803C5; Mon, 12 Feb 2018 10:03:50 +0100 (CET) From: "Charles Clavadetscher" To: "'Durumdara'" , "'Postgres General'" References: In-Reply-To: Subject: RE: Remove default privilege from DB Date: Mon, 12 Feb 2018 10:03:43 +0100 Message-ID: <09ca01d3a3e0$685ca460$3915ed20$@swisspug.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_09CB_01D3A3E8.CA210C60" X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQHDGTavHGtULrHj3GkiY/OpfM1QIKPBjeCg Content-Language: de-ch List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multipart message in MIME format. ------=_NextPart_000_09CB_01D3A3E8.CA210C60 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Hi From: Durumdara [mailto:durumdara@gmail.com] Sent: Montag, 12. Februar 2018 09:32 To: Postgres General Subject: Remove default privilege from DB Hello! I need to remove default privileges from a Database. After that some of them remains. Default access privileges Owner | Schema | Type | Access privileges ------------+--------+----------+------------------- postgres | | function | =X/postgres postgres | | sequence | postgres | | table | postgres | | type | =U/postgres suser | | function | =X/suser suser | | sequence | suser | | table | suser | | type | =U/suser How to completely remove the last items? Could you send me one example? I assume ALTER DEFAULT PRIVILEGES FOR ROLE suser REVOKE EXECUTE ON FUNCTIONS FROM PUBLIC; ALTER DEFAULT PRIVILEGES FOR ROLE suser REVOKE USAGE ON TYPE FROM PUBLIC; Bye Charles Thank you for it! Best regards DD ------=_NextPart_000_09CB_01D3A3E8.CA210C60 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hi

 

From:<= /b> Durumdara = [mailto:durumdara@gmail.com]
Sent: Montag, 12. Februar 2018 = 09:32
To: Postgres General = <pgsql-general@postgresql.org>
Subject: Remove default = privilege from DB

 

Hello!

 

I = need to remove default privileges from a = Database.

After that some of them = remains.

 

        =      Default access = privileges

   Owner  =   | Schema |   Type   | Access = privileges

------------+--------+--------= --+-------------------

 postgres  =  |        | function | = =3DX/postgres

 postgres  =  |        | sequence = |

 postgres  =  |        | table    = |

 postgres  =  |        | type     | = =3DU/postgres

 suser    =     |        | function | = =3DX/suser

 suser    =     |        | sequence |

 suser    =     |        | table    = |

 suser    =     |        | type     | = =3DU/suser

 

How to completely remove the = last items? 

Could = you send me one example?

 

I = assume

 

ALTER = DEFAULT PRIVILEGES FOR ROLE suser REVOKE EXECUTE ON FUNCTIONS FROM = PUBLIC;

ALTER = DEFAULT PRIVILEGES FOR ROLE suser REVOKE USAGE ON TYPE FROM = PUBLIC;

 

Bye

Charles

 

Thank = you for it!

 

Best = regards

  = DD

 

 

------=_NextPart_000_09CB_01D3A3E8.CA210C60--