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 1emi2w-0003vR-O7 for pgsql-general@arkaria.postgresql.org; Fri, 16 Feb 2018 15:35:34 +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 1emi2v-00043R-KR for pgsql-general@arkaria.postgresql.org; Fri, 16 Feb 2018 15:35:33 +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 1emi2v-00043H-Ci for pgsql-general@lists.postgresql.org; Fri, 16 Feb 2018 15:35:33 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1emi2s-000487-4e for pgsql-general@postgresql.org; Fri, 16 Feb 2018 15:35:32 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 3A5F85F79E; Fri, 16 Feb 2018 10:35:28 -0500 (EST) Date: Fri, 16 Feb 2018 10:35:28 -0500 From: Stephen Frost To: "David G. Johnston" Cc: Durumdara , Charles Clavadetscher , Postgres General Subject: Re: Remove default privilege from DB Message-ID: <20180216153528.GI2416@tamriel.snowman.net> References: <09ca01d3a3e0$685ca460$3915ed20$@swisspug.org> <0f5a01d3a65f$a0a38010$e1ea8030$@swisspug.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KAMPqQMScv9Yi4g9" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --KAMPqQMScv9Yi4g9 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * David G. Johnston (david.g.johnston@gmail.com) wrote: > On Fri, Feb 16, 2018 at 7:56 AM, Durumdara wrote: >=20 > > I want to know what happened in the background. > > I will make "negative" state if I revoke DefACL without prior grant? >=20 > =E2=80=8BNot really following the whole thread but figured I'm comment on= this > point that confused me in the past as well.=E2=80=8B >=20 > =E2=80=8BNot sure if this is what you mean but there is no concept of "ne= gative > state" in the permissions system. Everything starts out with no > permissions. Grant adds permissions and revoke un-adds granted > permissions.=E2=80=8B Revoking something that doesn't exist is either a = no-op or a > warning depending on the context - either way its doesn't setup a > "forbidden" state for the permission. This isn't entirely correct. Functions are the classic example where EXECUTE to PUBLIC is part of the default and the "negative" state of having a function where EXECUTE is REVOKE'd from PUBLIC is entirely reasonable and even common. Further, object owners also have a default set of privileges which can be revoked from them, and that's true of basically all objects. > Revoking/granting on default ACLs never affects already existing objects. Right, to change existing ACLs one would use GRANT ON ALL or individual GRANT statements. Thanks! Stephen --KAMPqQMScv9Yi4g9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJahvo/AAoJEO1sijiDR2RVGZ8QAMIUmnXzOphhfct9RSYk0cnk NgkhUhJSmOcJi5UnC7Y9/cNzo7cdFLZqMZTgFOTw7Ku0+71PERlWSv+F1wpvK3V7 4KSbmMXgq7IuuniYeCqYvvO2yiz3jrV+Fo7MWUyUM4FKOZFAEjJ+iAM6qZ1Ds+6/ 8zpmiWdRC7MtHh/Z0OjFOGG2RekvmoVWdiqcRK2x3s92HlelSE/yHkOPPNrRNRCO iYL5/jYiQvM0RjHlqBaOrj3LdjjRo9SVNvFhCN+65Io+QhtsV+kMg7s44hWTbxxw uZp7LWbQ6n5z8gekk+kX+f+ifZWixI30ywTw1r02Yi+Gf+/kH9me/ruaHjOL4XNm rtB8j+ScgTAWQYWtIZCyAmJ9rsBICRIW91nOelqpXY6+NEmZfuMNDMEb4KLRqaQ8 j1gzfXP9skQ7CvIJqkNhNKXLk3JsSgclANlEMBTss6GAr2jQ2kUx1Z1+bYffucUv EY8S4+ML/IfGUk8axAD0O89pVZXU1I6oZ/8J9ZRA5QH2cQvB50yKB7PV06eIVc8V 8dHOwWs0gjUr89aewbxr8Ij4m87i06OcB6PCFkQuy2QU7ouEXLRBkIKnF+3JsRmQ flQvkIHqWS3UmS6ZYdiNWsC4csaeN7ssnVC7ZWDbaJekO/g8KYo7cRxNzm/SJg1d 8gYerA8LaPt/U1yJlcsP =KmVM -----END PGP SIGNATURE----- --KAMPqQMScv9Yi4g9--