Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fud5J-0005WC-4C for pgsql-general@arkaria.postgresql.org; Tue, 28 Aug 2018 12:27:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fud5H-0005WX-Jr for pgsql-general@arkaria.postgresql.org; Tue, 28 Aug 2018 12:26:59 +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.89) (envelope-from ) id 1fud5H-0005WQ-8P for pgsql-general@lists.postgresql.org; Tue, 28 Aug 2018 12:26:59 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fud5E-00053H-TK for pgsql-general@postgresql.org; Tue, 28 Aug 2018 12:26:58 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 8F0165F79C; Tue, 28 Aug 2018 08:26:56 -0400 (EDT) Date: Tue, 28 Aug 2018 08:26:56 -0400 From: Stephen Frost To: Dean Rasheed Cc: Alvaro Herrera , Ken Tanzer , David G Johnston , David Rowley , PG-General Mailing List Subject: Re: Will there ever be support for Row Level Security on Materialized Views? Message-ID: <20180828122656.GE3326@tamriel.snowman.net> References: <20180828004941.irsrxcvvmcblnjqh@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="siH5g6X9/kbebbtM" 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 --siH5g6X9/kbebbtM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Dean Rasheed (dean.a.rasheed@gmail.com) wrote: > On 28 August 2018 at 01:49, Alvaro Herrera wro= te: > > On 2018-Aug-27, Ken Tanzer wrote: > >> - In the scheme of things, is it a lot of work or not so much? > > > > Probably not much. >=20 > Yeah, it doesn't seem like it would be particularly difficult, but it > would probably still be a reasonable amount of work to go round > finding all the places in code that would need updating. I.e., I think > it would be more mechanical work, than anything fundamentally > challenging. >=20 > On the face of it, it seems like it might be a reasonable thing to > support, but I wonder, is this really just syntactic sugar for > creating a security barrier view on top of the materialized view? >=20 > When RLS was originally implemented, that same question was asked for > tables, but the answer was "no" because RLS on a table gives you > fine-grained (row-level) control over what data in the table can be > modified as well as read, which a SB view doesn't give you. But for a > MV view, that's not a consideration, so what would RLS on a MV > actually give you? I see value in being able to have a consistent set of policies which are applied across tables, views, matviews, etc. Also, with simple updateable views, updates can be done, so there's also that to consider. Ultimately, I do think it'd be good to have RLS support for views, mat views, and foreign tables. Thanks! Stephen --siH5g6X9/kbebbtM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJbhT+QAAoJEO1sijiDR2RVyUgP/R3aqaP1nus9KmKGYc5C3hqp jxxP4DlMkSrT2HxLOKUbg+EiSNFqy1KaVcFshTnKVC6vlabKQOXrUvcuu+g+spi+ pFTWvejzHsFyNBB6fQtUgm6eiOXdfS4mmptATZVGlAz95zDmTFLAV2fufWvNmk93 nT+0YtFPTys2TF+QE+Ul65Xt6QSewUFqvyHgy83WFoB/8vHwptqhniwZdBrqicLJ zc+rAtjOBnTbQHBFJTsynHag7sR7BmcKmRNzSG6qvtWic4lJgmJgMgNd4kUj9r/m m9IabYL6SBI3ejQlX4ZTmGKZtBWrBTu/Z4yzb8j43q4jQJ7VuDtrABwxFTcxcCLY htSJTFQzHLlK1PffmsJs6kxMOa17J7Q4F4XcvmOwUcjO18cP4k/hef+NZ+2DU/Ja bvBIKgDESfpappJ7pegrVQkoYxUIk6EhQ2aFRUyJb952ACxPo1X1Gcj8yxWAGceK DIjivlYT7YqHLZHoU/mcUBsZXc6IcK/SD6s0ydfq42p/3QlehLCJJ4ez20nYA9xj l6yZOfVzBQHbmnuEiaCnky1Rz1OVtjO50eNXPR7IKVWZU3tV/3mpBYCdqHYr9kZt ixp7f97tzQSdb5P87od0lIkfK68UtRl+VkJTuYS84Pagg79xQztAKiOmUu/ps3fh 2W5d39lnpVRMigRU3Td/ =4X2z -----END PGP SIGNATURE----- --siH5g6X9/kbebbtM--