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

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Adam Guthrie <asguthrie(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: "plan should not reference subplan's variable" when using row level security
Date: 2016-02-24 20:27:51
Message-ID: 20160224202751.GI3127@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adam,

* Adam Guthrie (asguthrie(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephen Frost 2016-02-24 20:29:55 Re: "plan should not reference subplan's variable" when using row level security
Previous Message Adrian Klaver 2016-02-24 19:54:42 Re: "plan should not reference subplan's variable" when using row level security