Re: policies and extensions

2020-02-18 Thread Marc Munro
On Tue, 2020-02-18 at 15:06 -0500, Stephen Frost wrote: > > Policies, also being part of the overall privilege system, could > certainly be looked at in a similar light as being different from > triggers and indexes... While I think I agree with Stephen here, I don't have a vested interest in an

Re: policies and extensions

2020-02-18 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Marc Munro writes: > > On Mon, 2020-02-17 at 22:48 -0500, Tom Lane wrote: > >> An RLS policy is a table "subsidiary object" so it only depends indirectly > >> on the extension that owns the table. > > > Yep, I get that, and I see the dependency

Re: policies and extensions

2020-02-18 Thread Marc Munro
e applies. My use case is a tool that determines the state of a database for performing diffs, etc.  It can generate ddl from database diffs to create or alter tables, etc, and can also deal with policies and extensions but will not be able to deal with policies created in extensions, which is d

Re: policies and extensions

2020-02-18 Thread Tom Lane
Marc Munro writes: > On Mon, 2020-02-17 at 22:48 -0500, Tom Lane wrote: >> An RLS policy is a table "subsidiary object" so it only depends indirectly >> on the extension that owns the table. > Yep, I get that, and I see the dependency chain in the catalog.  > However an extension can create the

Re: policies and extensions

2020-02-17 Thread Tom Lane
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 tha

Re: policies and extensions

2020-02-17 Thread Adrian Klaver
On 2/17/20 2:46 PM, Marc Munro wrote: 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? This is postgres 9.5.21 Here is the relevant code from the extension: create table rls2 (   username te

policies and extensions

2020-02-17 Thread Marc Munro
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? This is postgres 9.5.21 Here is the relevant code from the extension: create table rls2 (   username text not null,   details  text not null