pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Adam Guthrie <asguthrie@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: "plan should not reference subplan's variable" when using row level security
Date: Wed, 24 Feb 2016 15:27:51 -0500
Message-ID: <20160224202751.GI3127@tamriel.snowman.net> (raw)
In-Reply-To: <CAC3DOVy2H7W5bGeVaJjq5XtKvxGNKiPkG_SjXNOqXYLB5ccFBA@mail.gmail.com>
References: <CAC3DOVy2H7W5bGeVaJjq5XtKvxGNKiPkG_SjXNOqXYLB5ccFBA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (6+ messages)  latest in thread

Message-ID: <20160224202751.GI3127@tamriel.snowman.net>
Permalink:  ../20160224202751.GI3127@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20160224202751.GI3127@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: sfrost@snowman.net, asguthrie@gmail.com
  Subject: Re: "plan should not reference subplan's variable" when using row level security
  In-Reply-To: <20160224202751.GI3127@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox