Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j3tsB-0002SS-RN for pgsql-general@arkaria.postgresql.org; Tue, 18 Feb 2020 03:48:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j3ts8-00039s-KY for pgsql-general@arkaria.postgresql.org; Tue, 18 Feb 2020 03:48:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j3ts8-00039l-0Q for pgsql-general@lists.postgresql.org; Tue, 18 Feb 2020 03:48:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j3ts5-0004Ly-00 for pgsql-general@postgresql.org; Tue, 18 Feb 2020 03:48:30 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 01I3mRL1000680; Mon, 17 Feb 2020 22:48:27 -0500 From: Tom Lane To: Marc Munro cc: pgsql-general@postgresql.org Subject: Re: policies and extensions In-reply-to: <1581979568.18009.18.camel@bloodnok.com> References: <1581979568.18009.18.camel@bloodnok.com> Comments: In-reply-to Marc Munro message dated "Mon, 17 Feb 2020 14:46:08 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <678.1581997707.1@sss.pgh.pa.us> Date: Mon, 17 Feb 2020 22:48:27 -0500 Message-ID: <679.1581997707@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Marc Munro writes: > I tried to define a policy within an extension but the policy does not > seem to belong to the extension. Is this the way it is supposed to be? Yeah, I would expect that. https://www.postgresql.org/docs/current/extend-extensions.html says: The kinds of SQL objects that can be members of an extension are shown in the description of ALTER EXTENSION. ... Also notice that while a table can be a member of an extension, its subsidiary objects such as indexes are not directly considered members of the extension. ... An RLS policy is a table "subsidiary object" so it only depends indirectly on the extension that owns the table. regards, tom lane