Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YgKke-0000mr-Ja for pgsql-bugs@arkaria.postgresql.org; Thu, 09 Apr 2015 22:16:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YgKkd-0003s0-Vl for pgsql-bugs@arkaria.postgresql.org; Thu, 09 Apr 2015 22:16:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YgKkd-0003ru-9O for pgsql-bugs@postgresql.org; Thu, 09 Apr 2015 22:16:43 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YgKkZ-0002Cx-6y for pgsql-bugs@postgresql.org; Thu, 09 Apr 2015 22:16:42 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 54ECF5F7AC; Thu, 9 Apr 2015 18:16:38 -0400 (EDT) Date: Thu, 9 Apr 2015 18:16:38 -0400 From: Stephen Frost To: digoal@126.com Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #13004: PostgreSQL 9.5 policy for table bug? Message-ID: <20150409221638.GE3663@tamriel.snowman.net> References: <20150409024355.26380.72252@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5kKFnMzJ1rlmqP2F" Content-Disposition: inline In-Reply-To: <20150409024355.26380.72252@wrigleys.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: 18:08:54 up 21 days, 3:57, 6 users, load average: 0.03, 0.06, 0.09 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-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org --5kKFnMzJ1rlmqP2F Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * digoal@126.com (digoal@126.com) wrote: > There is no policy for r3's select command , why cann't see rows? As documented, if row-level security is enabled on the table and there is no policy which applies, then a default-deny policy will be used. If you want there to be no filtering on SELECTs for this user, simply create a policy with 'true' as the USING clause. > There is no policy for r3's delete command , why cann't delete? Same here. > another nonsuper role , and not owner: >=20 > postgres=3D> \c postgres r1 > You are now connected to database "postgres" as user "r1". > postgres=3D# select * from test; > id | r =20 > ----+---- > 1 | r1 > 2 | r2 > 4 | r1 > 4 | r2 > 4 | r1 > 4 | r2 > 4 | r1 > 4 | r3 > (8 rows) Are you sure that r1 isn't a superuser? Certainly, the prompt displayed above (postgres=3D#) implies that it is. Further, I'm unable to reproduce this issue with current master, based on what I understand of the setup. A self-contained test case, including the exact commands used from the start, would help immensely. Thanks! Stephen --5kKFnMzJ1rlmqP2F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJVJvpFAAoJEO1sijiDR2RVV9oP/2xQs5zqEII/viOUsuoHT9IJ 9hc7CsLSBK+GQAID5lWW4TrQcyd+kwlvjTzldQaJFzuzTsQ0EH91wjEJfobl8t9L Tq6TOVh8OrOHUnCLFLNmTcTQbqr9BWiLUnXfW2zHNgGK5VroTQeh4tXptGM6v/Md e/pHZnPSXlyNwbeMZTOf0QWLn55U6iSNR7bIPyq7TApyO10IsMdOlQyb/39TU96J WX1YtaNh2oJGXvy1FjEEBCoo/3IgzvKEOzhThV24BecnBcfg/pL7oW00ZbauNBso 9x4tpK/nHj+3SiTb4DgUbOTgohTrnDGtetFdRJbbfqXosGlpM31UZnhHpnkUsFlL 9s3prui1d+1n3hpR0FPJfdMOpGmBWvPkWIPyE4kYfjb9UpU3oRGYWtnQ38b1WB6K fxRDZh70XYajOt3zJnYTnj9RfUSyeNwZqKpqWtgWaCBYkucYscO8+K40VBA7DgpX cTCwPsyRTYfa2j0RcSX+2bBN9EpmGDbZPcf/N8qcliW6aZ6Pft+O+g3KvqYikZM1 n6eS/w/f8jxK/yKbZHIQpng9z6NidxhVwTcr7soATobyUZUWKGcXarNP3x36xLvp KHrQr3T/IRuXfUVO23Kg1WwGdftaAaVTY34cgg44iw+pg5/9SHVwQnm6QkxROJMb X0m/h58Eyw5xRxM8xdq5 =mLzY -----END PGP SIGNATURE----- --5kKFnMzJ1rlmqP2F--