From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Brightwell, Adam" <adam(dot)brightwell(at)crunchydatasolutions(dot)com>, 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 00:49:58 |
Message-ID: | 20140717004958.GI16422@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Adam,
* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> "Brightwell, Adam" <adam(dot)brightwell(at)crunchydatasolutions(dot)com> writes:
> >> ALTER TABLE table_name ADD POLICY policy_name (quals);
> >> ALTER TABLE table_name POLICY FOR role_name IS policy_name;
> >> ALTER TABLE table_name DROP POLICY policy_name;
[...]
> This actually isn't just bison being stupid: in fact, you simply
> cannot tell whether
>
> ALTER TABLE tab ADD POLICY varchar(42);
>
> is an attempt to add a column named "policy" of type varchar(42), or an
> attempt to add a policy named "varchar" with quals "42".
>
> Pick a different syntax.
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)
Thanks!
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2014-07-17 01:35:59 | Re: Question about src/timezone/zic.c |
Previous Message | Tom Lane | 2014-07-17 00:04:49 | Re: RLS Design |