pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Row-Level Security Policies (RLS)
Date: Tue, 26 May 2015 21:42:06 -0400
Message-ID: <20150527014206.GF26667@tamriel.snowman.net> (raw)
In-Reply-To: <20150526144406.GU5885@postgresql.org>
References: <E1XV0JP-0003h6-O6@gemulon.postgresql.org>
	<20150522180807.GB5885@postgresql.org>
	<20150526130800.GA26667@tamriel.snowman.net>
	<20150526144406.GU5885@postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Alvaro,

* Alvaro Herrera (alvherre@2ndquadrant.com) wrote:
> Stephen Frost wrote:
> > * Alvaro Herrera (alvherre@2ndquadrant.com) wrote:
> > > What do we need RowSecurityPolicy->policy_id for?  It seems to me that
> > > it is only used to determine whether the policy is the "default deny"
> > > one, so that it can later be removed if a hook adds a different one.
> > > This seems contrived as well as under-documented.  Why isn't a boolean
> > > flag sufficient?
> > 
> > Thanks for taking a look!
> > 
> > It's also used during relcache updates (see equalPolicy()).
> 
> Hmm, but the policy name is unique also, right?  So the policy_id check
> is redundant ...

I don't disagree with that, but surely checking if it's the same OID and
exiting immediately is going to be faster than comparing the policy
names.

Now, looking at the code, I'm actually failing to see a case where we
use the RowSecurityPolicy->policy_name..  Perhaps *that's* what we
should be looking to remove?

	Thanks!

		Stephen

Attachments:

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

view thread (19+ messages)  latest in thread

Message-ID: <20150527014206.GF26667@tamriel.snowman.net>
Permalink:  ../20150527014206.GF26667@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20150527014206.GF26667@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: sfrost@snowman.net, alvherre@2ndquadrant.com, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Row-Level Security Policies (RLS)
  In-Reply-To: <20150527014206.GF26667@tamriel.snowman.net>
  References: <E1XV0JP-0003h6-O6@gemulon.postgresql.org> <20150522180807.GB5885@postgresql.org> <20150526130800.GA26667@tamriel.snowman.net> <20150526144406.GU5885@postgresql.org> <20150527014206.GF26667@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