Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YxEaV-00086L-L8 for pgsql-hackers@arkaria.postgresql.org; Tue, 26 May 2015 13:08:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YxEaU-0002qx-PY for pgsql-hackers@arkaria.postgresql.org; Tue, 26 May 2015 13:08:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YxEaS-0002qq-Uj for pgsql-hackers@postgresql.org; Tue, 26 May 2015 13:08:05 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1YxEaP-0005sN-K0 for pgsql-hackers@postgresql.org; Tue, 26 May 2015 13:08:04 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 694DA5F79A; Tue, 26 May 2015 09:08:00 -0400 (EDT) Date: Tue, 26 May 2015 09:08:00 -0400 From: Stephen Frost To: Alvaro Herrera Cc: pgsql-hackers@postgresql.org Subject: Re: [COMMITTERS] pgsql: Row-Level Security Policies (RLS) Message-ID: <20150526130800.GA26667@tamriel.snowman.net> References: <20150522180807.GB5885@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/gH3dn+HNRcibxzP" Content-Disposition: inline In-Reply-To: <20150522180807.GB5885@postgresql.org> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-46-generic (x86_64) X-Uptime: 09:03:50 up 67 days, 18:52, 17 users, load average: 0.02, 0.05, 0.05 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --/gH3dn+HNRcibxzP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Alvaro, * Alvaro Herrera (alvherre@2ndquadrant.com) wrote: > What do we need RowSecurityPolicy->policy_id for? It seems to me that > it is only used to determine whether the policy is the "default deny" > one, so that it can later be removed if a hook adds a different one. > This seems contrived as well as under-documented. Why isn't a boolean > flag sufficient? Thanks for taking a look! It's also used during relcache updates (see equalPolicy()). That wasn't originally the case (I had missed adding the necessary bits to relcache in the original patch), but I wouldn't want to remove that piece now and, given that it's there, using InvalidOid to indicate when it's the default-deny policy (and therefore this is no actual Oid) seems sensible. Thanks again! Stephen --/gH3dn+HNRcibxzP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJVZHAvAAoJEO1sijiDR2RVsp4P/Rc76VXpN5olrLfYsIxvGWaS 0lMVCHWDTPf4rMsHIGBSmoECrrIc6yoaqwVI7hsA+Cm39v88xnx6v6hW3/ftBMhl +U7tAUGLgGJdNsxywFJSEkzaBEo+dt4vdhtJNODqaegz1tCNk5rNL1QnntXMeWps JPwb74vPidZkMPbOwhWJiIpsHj3qUmL/GMGPGX0Hndn3qUwSAzdH8NXd7pfFG83W /etFsETzNH+bSUGwotD7OAtQPaonwnaMidHtmzVI+V03AA6uSVFwQZUCwGXfZBE2 BA9FdDP0zvZC2H/nLPSO0j3vr3MR1JS9IXHUDSj3VNPBZbG/SeC0k/jMDFTQL28F 95OE8gRnGtMhD7Z5nF90Kj1crBuoHP35zKCiB5ktLc7n0DoqCerjjQ3/qqZIe3Iq UUisk2pj7bSZvQfQ7s4Rel5wWl0kRtJ9vYUkK52f45n+PK5JbSOhwu7ZoO5YlurT 3Fsr4690cN5Ub/9T8HVAe4m1rEVTNf3CCiZZecl41xyqre9lnQ2EPMI89Gq8G867 +7qzWc6mlBn5HnHobD9c9WtBvK278DOZVTROoVfzM+ux5dmce/XUxlDNfeEvc/gG cjzcx1791D8YNdoEKlA1P7wr+caZQWQrQXH8XmYyJp2TUBNZpBvZBGr1KDBnfLkP culq6CorHDECrURfH27K =Ao6T -----END PGP SIGNATURE----- --/gH3dn+HNRcibxzP--