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 1emiQ6-0005CC-5y for pgsql-general@arkaria.postgresql.org; Fri, 16 Feb 2018 15:59:30 +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 1emiQ4-0003ir-KT for pgsql-general@arkaria.postgresql.org; Fri, 16 Feb 2018 15:59:28 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1emiQ4-0003ih-6g for pgsql-general@lists.postgresql.org; Fri, 16 Feb 2018 15:59:28 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1emiQ1-0004bb-Lc for pgsql-general@postgresql.org; Fri, 16 Feb 2018 15:59:27 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id A20F65F79C; Fri, 16 Feb 2018 10:59:24 -0500 (EST) Date: Fri, 16 Feb 2018 10:59:24 -0500 From: Stephen Frost To: Tom Lane Cc: "David G. Johnston" , Durumdara , Charles Clavadetscher , Postgres General Subject: Re: Remove default privilege from DB Message-ID: <20180216155924.GJ2416@tamriel.snowman.net> References: <09ca01d3a3e0$685ca460$3915ed20$@swisspug.org> <0f5a01d3a65f$a0a38010$e1ea8030$@swisspug.org> <20180216153528.GI2416@tamriel.snowman.net> <15452.1518796071@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="39EQZIcm488K5ZwS" Content-Disposition: inline In-Reply-To: <15452.1518796071@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --39EQZIcm488K5ZwS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Tom, * Tom Lane (tgl@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > * David G. Johnston (david.g.johnston@gmail.com) wrote: > >> =E2=80=8BNot sure if this is what you mean but there is no concept of = "negative > >> 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. >=20 > > 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. >=20 > FWIW, I thought David's description was fine. The fact that the initial > state of an object typically includes some positive grants doesn't change > the fact that there's no such thing as a negative grant. In particular, > if there is a GRANT TO PUBLIC, no amount of revoking that privilege from > individual users will have any effect, because the public grant is still > there. What I was particularly picking up on was the comment that "Everything starts out with no permissions" which implied, at least to me, the idea that no one has any rights on an object until those rights are GRANT'd, which isn't correct, as I described. Thanks! Stephen --39EQZIcm488K5ZwS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJahv/cAAoJEO1sijiDR2RVttsQAMbwGEIq/rMc6F5BkLFVbLXv WAdnBF3zdk/XBrkhKOQ9gN3WYAFoCBnJvi0phWulmlF/awx+G0GO7EzwPbAPNPpo ea8Ur6AjCuC2LTk8AGoFLIVgv1JKgiYVH16gFyInsF13asUtk7Yk1LcFu7iyN8EN 1KSt2ylOtKJx2VBEbU+OWhB2pYc6lAHFfYGgOFJ+uyu1K0SAwxq0PywoMIdgLiL5 QnDPWrVJhwftLTxIv9OCfB7JibjOM3yQ2D3xWaqQx1AIMAMrnDkGFfL9vC/1QXff 3eTGpyfTkW2p3URpNC6vhX8vXNRJX2g+w125tpBzMmsc5aePG8wuxvc7+4+EbPtz MVIjNU3zt64PEwxQszi9FENTEL/AJrn7JAe27V24yBYOvdz+BjOr5bpJhtNjp8Yw /68WM39lkl41a/nx2k0E8LUP5DMsXMzbOgZ0r/hQ5fvf2YzC679NcUmAFpGEmS6x 3BAaX1ujCbxVb3dGVtG+vuhInTdGXJcATXG8BuaVg3OT+/vHtZx9Rzqp/InSnwTz rWu5+g0o0MsThYHsd9tU7ctNFBbgUmwpatfsWns3lj8IHWEHNvENyi+YzqYVuxpk ozIffQ8duidWKZiFVHwZjjLtIoDrQsqm4sBPn0uWkZEU54jwh/VnsNS1p4Tlr9R+ Xgo7VOOX6zApRUGg/vRO =pklj -----END PGP SIGNATURE----- --39EQZIcm488K5ZwS--