Re: RLS Design

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: "Brightwell, Adam" <adam(dot)brightwell(at)crunchydatasolutions(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Yeb Havinga <yeb(dot)havinga(at)portavita(dot)nl>
Subject: Re: RLS Design
Date: 2014-07-17 02:06:01
Message-ID: 20140717020601.GO16422@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Adam,

* Brightwell, Adam (adam(dot)brightwell(at)crunchydatasolutions(dot)com) wrote:
> > Yeah, now that we're trying to bake this into ALTER TABLE we need to be
> > a bit more cautious. I'd think:
> >
> > ALTER TABLE tab POLICY ADD ...
> >
> > Would work though? (note: haven't looked/tested myself)
>
> Yes, I just tested it and the following would work from a grammar
> perspective:
>
> ALTER TABLE <table_name> POLICY ADD <policy_name> (policy_quals)
> ALTER TABLE <table_name> POLICY DROP <policy_name>

Excellent, glad to hear it.

> Though, it would obviously require the addition of POLICY to the list of
> unreserved keywords. I don't suspect that would be a concern, as it is not
> "reserved", but thought I would point it out just in case.

Right, I don't anticipate anyone complaining too loudly about that..

> Another thought I had was, would we also want the following, so that
> policies could be modified?
>
> ALTER TABLE <table_name> POLICY ALTER <policy_name> (policy_quals)

Sounds like a good idea to me.

Thanks!

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-07-17 02:32:37 Re: Question about src/timezone/zic.c
Previous Message Brightwell, Adam 2014-07-17 02:04:27 Re: RLS Design