Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TQKh9-0005y1-0K for pgsql-hackers@postgresql.org; Mon, 22 Oct 2012 16:17:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TQKh7-00023D-Tx for pgsql-hackers@postgresql.org; Mon, 22 Oct 2012 16:17:38 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q9MGHXUS002994; Mon, 22 Oct 2012 12:17:33 -0400 (EDT) From: Tom Lane To: Robert Haas cc: Alvaro Herrera , Kohei KaiGai , Dean Rasheed , Florian Pflug , PgHacker Subject: Re: [v9.3] Row-Level Security In-reply-to: References: <20121018181956.GL3763@alvh.no-ip.org> Comments: In-reply-to Robert Haas message dated "Mon, 22 Oct 2012 09:33:58 -0400" Date: Mon, 22 Oct 2012 12:17:33 -0400 Message-ID: <2993.1350922653@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201210/1309 X-Sequence-Number: 215545 Robert Haas writes: > The documentation lists several documented limitations that I would > like to analyze a little bit. First, it says that row-level security > policies are not applied on UPDATE or DELETE. That sounds downright > dangerous to me. Is there some really compelling reason we're not > doing it? [ blink... ] Isn't that a security hole big enough for a Mack truck? UPDATE tab SET foo = foo RETURNING *; sucks out all the data just fine, if RLS doesn't apply to it. Having said that, I fear that sensible row-level security for updates is at least one order of magnitude harder than sensible row-level security for selects. We've speculated about how to define that in the past, IIRC, but without any very satisfactory outcome. regards, tom lane