Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-30 Thread Stephen Frost
* Dean Rasheed (dean.a.rash...@gmail.com) wrote: > Don't forget the ALTER POLICY page. This and some of the other things > being discussed on this thread ought to be copied there too. Thanks, I've fixed this also. Stephen signature.asc Description: Digital signature

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-30 Thread Stephen Frost
* Dean Rasheed (dean.a.rash...@gmail.com) wrote: > On 30 January 2015 at 03:40, Stephen Frost wrote: > > * Robert Haas (robertmh...@gmail.com) wrote: > >> On Thu, Jan 29, 2015 at 9:04 PM, Stephen Frost wrote: > >> > A policy grants the ability to SELECT, INSERT, UPDATE, or DELETE rows > >> > whic

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-30 Thread Dean Rasheed
On 30 January 2015 at 03:40, Stephen Frost wrote: > * Robert Haas (robertmh...@gmail.com) wrote: >> On Thu, Jan 29, 2015 at 9:04 PM, Stephen Frost wrote: >> > A policy grants the ability to SELECT, INSERT, UPDATE, or DELETE rows >> > which match the relevant policy expression. Existing table rows

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-29 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Thu, Jan 29, 2015 at 9:04 PM, Stephen Frost wrote: > > A policy grants the ability to SELECT, INSERT, UPDATE, or DELETE rows > > which match the relevant policy expression. Existing table rows are > > checked against the expression specified via US

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-29 Thread Robert Haas
On Thu, Jan 29, 2015 at 9:04 PM, Stephen Frost wrote: > A policy grants the ability to SELECT, INSERT, UPDATE, or DELETE rows > which match the relevant policy expression. Existing table rows are > checked against the expression specified via USING, while new rows > that would be created via INSER

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-29 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Wed, Jan 28, 2015 at 10:45 PM, Stephen Frost wrote: > > I agree, especially after going back and re-reading this while fixing > > the issue mentioned earlier by Peter (which was an orthogonal complaint > > about the shadowing of WITH CHECK by USING

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-29 Thread Robert Haas
On Wed, Jan 28, 2015 at 10:45 PM, Stephen Frost wrote: > I agree, especially after going back and re-reading this while fixing > the issue mentioned earlier by Peter (which was an orthogonal complaint > about the shadowing of WITH CHECK by USING, if WITH CHECK isn't > specified). We really need a

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-29 Thread Stephen Frost
* Dean Rasheed (dean.a.rash...@gmail.com) wrote: > On 29 January 2015 at 04:00, Stephen Frost wrote: > > * Robert Haas (robertmh...@gmail.com) wrote: > >> On Wed, Jan 7, 2015 at 3:06 PM, Stephen Frost wrote: > >> > If I'm following correctly, Peter's specifically talking about: > >> > > >> >

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-29 Thread Dean Rasheed
On 29 January 2015 at 04:00, Stephen Frost wrote: > * Robert Haas (robertmh...@gmail.com) wrote: >> On Wed, Jan 7, 2015 at 3:06 PM, Stephen Frost wrote: >> > If I'm following correctly, Peter's specifically talking about: >> > >> > [ USING ( expression ) ] >> > [ WITH CHECK ( > > class="p

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-28 Thread Stephen Frost
Dean, * Dean Rasheed (dean.a.rash...@gmail.com) wrote: > [There's also a typo further down -- "filter out the records which are > visible", should be "not visible"] I agree, that's not really worded quite right. I've reworded this along the lines of what you suggested (though not exactly- if you

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-28 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Wed, Jan 7, 2015 at 3:06 PM, Stephen Frost wrote: > > If I'm following correctly, Peter's specifically talking about: > > > > [ USING ( expression ) ] > > [ WITH CHECK ( > class="parameter">check_expression ) ] > > > > Where the USING para

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-28 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Fri, Jan 9, 2015 at 3:46 PM, Stephen Frost wrote: > >A policy permits SELECT, INSERT, UPDATE or DELETE commands to access rows > >in a table that has row level security enabled. Access to existing table > >rows is granted if they match

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-28 Thread Stephen Frost
Peter, * Peter Geoghegan (p...@heroku.com) wrote: > I also don't see this behavior documented (this is from process_policies()): [...] > But is that really the right place for it? Does it not equally well > apply to FOR UPDATE policies, that can on their own have both barriers > quals and WITH CHE

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-14 Thread Robert Haas
On Fri, Jan 9, 2015 at 3:46 PM, Stephen Frost wrote: >A policy permits SELECT, INSERT, UPDATE or DELETE commands to access rows >in a table that has row level security enabled. Access to existing table >rows is granted if they match a policy expression specified via USING, >while

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-09 Thread Dean Rasheed
On 9 January 2015 at 20:46, Stephen Frost wrote: > I'd suggest we further clarify > with: > >The CREATE POLICY command defines a new policy for a >table. Note that row level security must also be enabled on the table > using >ALTER TABLE in order for created policies to be applied. >

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-09 Thread Stephen Frost
Dean, * Dean Rasheed (dean.a.rash...@gmail.com) wrote: > On 8 January 2015 at 18:57, Stephen Frost wrote: > >> What do you think of the attached rewording? > > > > Rewording it this way is a great idea. Hopefully that will help address > > the confusion which we've seen. The only comment I have

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-09 Thread Dean Rasheed
On 8 January 2015 at 18:57, Stephen Frost wrote: >> What do you think of the attached rewording? > > Rewording it this way is a great idea. Hopefully that will help address > the confusion which we've seen. The only comment I have offhand is: > should we should add a sentence to this paragraph a

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-08 Thread Stephen Frost
Dean, * Dean Rasheed (dean.a.rash...@gmail.com) wrote: > [There's also a typo further down -- "filter out the records which are > visible", should be "not visible"] > > What do you think of the attached rewording? Rewording it this way is a great idea. Hopefully that will help address the confu

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-08 Thread Dean Rasheed
On 8 January 2015 at 08:30, Dean Rasheed wrote: > I have a wider concern about the wording on this page - both the > rewritten paragraph and elsewhere talk about policies in terms of > limiting access to or filtering out rows. > > However, since policy expressions are OR'ed together and there is a

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-08 Thread Dean Rasheed
On 6 January 2015 at 19:25, Stephen Frost wrote: > Robert, Amit, > > * Robert Haas (robertmh...@gmail.com) wrote: >> I don't think that's a typo, although it's not particularly >> well-worded IMHO. I might rewrite the whole paragraph like this: >> >> A policy limits the ability to SELECT, INSERT,

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-07 Thread Peter Geoghegan
On Wed, Jan 7, 2015 at 12:06 PM, Stephen Frost wrote: > Where the USING parameter is 'expression' but the WITH CHECK parameter > is 'check_expression'. He makes a good point, I believe, as > "expression" is overly generic. I don't like the idea of using > "barrier_expression" though as that ends

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-07 Thread Stephen Frost
* Peter Geoghegan (p...@heroku.com) wrote: > I also don't see this behavior documented (this is from process_policies()): > > /* > * If we end up with only USING quals, then use those as > * WITH CHECK quals also. > */ > if (with_check_quals == NIL) > with_check_quals = copyObject(quals); > >

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-07 Thread Robert Haas
On Wed, Jan 7, 2015 at 3:06 PM, Stephen Frost wrote: > If I'm following correctly, Peter's specifically talking about: > > [ USING ( expression ) ] > [ WITH CHECK ( class="parameter">check_expression ) ] > > Where the USING parameter is 'expression' but the WITH CHECK parameter > is 'chec

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-07 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Tue, Jan 6, 2015 at 4:07 PM, Peter Geoghegan wrote: > > On Tue, Jan 6, 2015 at 1:03 PM, Robert Haas wrote: > >> I thought my rewrite clarified this distinction pretty well. Maybe > >> I'm wrong? We're talking about the same paragraph. > > > > So

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-07 Thread Robert Haas
On Tue, Jan 6, 2015 at 4:07 PM, Peter Geoghegan wrote: > On Tue, Jan 6, 2015 at 1:03 PM, Robert Haas wrote: >> I thought my rewrite clarified this distinction pretty well. Maybe >> I'm wrong? We're talking about the same paragraph. > > Sorry, I didn't express myself clearly. I think that you di

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-06 Thread Amit Langote
On 07-01-2015 AM 04:25, Stephen Frost wrote: > Robert, Amit, > > * Robert Haas (robertmh...@gmail.com) wrote: >> I don't think that's a typo, although it's not particularly >> well-worded IMHO. I might rewrite the whole paragraph like this: >> >> A policy limits the ability to SELECT, INSERT, UPD

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-06 Thread Peter Geoghegan
I also don't see this behavior documented (this is from process_policies()): /* * If we end up with only USING quals, then use those as * WITH CHECK quals also. */ if (with_check_quals == NIL) with_check_quals = copyObject(quals); Now, I do see a reference to it under "Per-Command policies -

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-06 Thread Peter Geoghegan
On Tue, Jan 6, 2015 at 1:03 PM, Robert Haas wrote: > I thought my rewrite clarified this distinction pretty well. Maybe > I'm wrong? We're talking about the same paragraph. Sorry, I didn't express myself clearly. I think that you did get it right, but I would like to see that distinction also

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-06 Thread Robert Haas
On Tue, Jan 6, 2015 at 2:48 PM, Peter Geoghegan wrote: > On Tue, Jan 6, 2015 at 11:25 AM, Stephen Frost wrote: >> Looks reasonable to me. Amit, does this read better for you? If so, I >> can handle making the change to the docs. > > The docs also prominently say: > > "The security-barrier quali

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-06 Thread Peter Geoghegan
On Tue, Jan 6, 2015 at 11:25 AM, Stephen Frost wrote: > Looks reasonable to me. Amit, does this read better for you? If so, I > can handle making the change to the docs. The docs also prominently say: "The security-barrier qualifications will always be evaluated prior to any user-defined funct

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-06 Thread Stephen Frost
Robert, Amit, * Robert Haas (robertmh...@gmail.com) wrote: > I don't think that's a typo, although it's not particularly > well-worded IMHO. I might rewrite the whole paragraph like this: > > A policy limits the ability to SELECT, INSERT, UPDATE, or DELETE rows > in a table to those rows which m

Re: [HACKERS] Possible typo in create_policy.sgml

2015-01-06 Thread Robert Haas
On Tue, Jan 6, 2015 at 12:26 AM, Amit Langote wrote: > Following is perhaps a typo: > > - qualifications of queries which are run against the table the policy > is on, > + qualifications of queries which are run against the table if the > policy is on, > > Attached fixes it if so. I don't thi

[HACKERS] Possible typo in create_policy.sgml

2015-01-05 Thread Amit Langote
Hi, Following is perhaps a typo: - qualifications of queries which are run against the table the policy is on, + qualifications of queries which are run against the table if the policy is on, Attached fixes it if so. Thanks, Amit diff --git a/doc/src/sgml/ref/create_policy.sgml b/doc/src/sg