Re: "plan should not reference subplan's variable" when using row level security - Mailing list pgsql-general

From Stephen Frost
Subject Re: "plan should not reference subplan's variable" when using row level security
Date
Msg-id 20160224202751.GI3127@tamriel.snowman.net
Whole thread Raw
In response to "plan should not reference subplan's variable" when using row level security  (Adam Guthrie <asguthrie@gmail.com>)
Responses Re: "plan should not reference subplan's variable" when using row level security  (Adam Guthrie <asguthrie@gmail.com>)
List pgsql-general
Adam,

* Adam Guthrie (asguthrie@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 that plan shouldn't be
getting built/considered.

As a work-around, until we fix it, you could create an sql function to
check for the existance of the id in 'a' and use that in the policy
definition.

Thanks!

Stephen

Attachment

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: "plan should not reference subplan's variable" when using row level security
Next
From: Stephen Frost
Date:
Subject: Re: "plan should not reference subplan's variable" when using row level security