Re: [GENERAL] "plan should not reference subplan's variable" when using row level security

2016-02-24 Thread Stephen Frost
* Adam Guthrie (asguth...@gmail.com) wrote: > On 24 February 2016 at 20:27, Stephen Frost wrote: > > Yeah, looks like a bug to me. My gut reaction is that we're pulling up > > a subquery in a way that isn't possible and that plan shouldn't be > > getting built/considered. >

Re: [GENERAL] "plan should not reference subplan's variable" when using row level security

2016-02-24 Thread Adam Guthrie
On 24 February 2016 at 20:27, Stephen Frost wrote: > Yeah, looks like a bug to me. My gut reaction is that we're pulling up > a subquery in a way that isn't possible and that plan shouldn't be > getting built/considered. Thanks - shall I go ahead and submit a bug report? >

Re: [GENERAL] "plan should not reference subplan's variable" when using row level security

2016-02-24 Thread Stephen Frost
Adrian, * Adrian Klaver (adrian.kla...@aklaver.com) wrote: > I started to work through this when I realized the > permissions/attributes of the role test are not shown. This seems to > be important as the UPDATE example works if you run it immediately > after: > > INSERT INTO b (id, a_id, text)

Re: [GENERAL] "plan should not reference subplan's variable" when using row level security

2016-02-24 Thread Stephen Frost
Adam, * Adam Guthrie (asguth...@gmail.com) wrote: > psql:/tmp/test.sql:26: ERROR: plan should not reference subplan's variable > > Is this a bug or am I doing something wrong? Yeah, looks like a bug to me. My gut reaction is that we're pulling up a subquery in a way that isn't possible and

Re: [GENERAL] "plan should not reference subplan's variable" when using row level security

2016-02-24 Thread Adrian Klaver
On 02/24/2016 09:51 AM, Adam Guthrie wrote: Hi, Whilst trying to use row level security with a subquery in the USING expression, I'm receiving an error "plan should not reference subplan's variable" A simple sql file to reproduce: CREATE TABLE a ( id INTEGER PRIMARY KEY );

[GENERAL] "plan should not reference subplan's variable" when using row level security

2016-02-24 Thread Adam Guthrie
Hi, Whilst trying to use row level security with a subquery in the USING expression, I'm receiving an error "plan should not reference subplan's variable" A simple sql file to reproduce: CREATE TABLE a ( id INTEGER PRIMARY KEY ); CREATE TABLE b ( id INTEGER PRIMARY KEY,