Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id BE385633729 for ; Mon, 21 Sep 2009 07:50:16 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 85703-01 for ; Mon, 21 Sep 2009 10:49:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from phoenix.advel.cz (phoenix.advel.cz [81.0.239.26]) by mail.postgresql.org (Postfix) with SMTP id 07AD6632D28 for ; Mon, 21 Sep 2009 07:50:04 -0300 (ADT) Received: (qmail 32296 invoked from network); 21 Sep 2009 12:50:01 +0200 Received: from unknown (HELO ?10.12.0.96?) (88.103.48.48) by 192.168.1.50 with SMTP; 21 Sep 2009 12:50:01 +0200 Message-ID: <4AB75A51.5060807@pjmodos.net> Date: Mon, 21 Sep 2009 12:49:53 +0200 From: Petr Jelinek User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Abhijit Menon-Sen CC: pgsql-hackers@postgresql.org Subject: Re: GRANT ON ALL IN schema References: <4A37BF63.50008@pjmodos.net> <4A37E122.8070303@pjmodos.net> <4A38A956.8080600@pjmodos.net> <4A4DE104.8090605@pjmodos.net> <4A6059B4.5010004@pjmodos.net> <4A607997.3030305@pjmodos.net> <21542.1249492707@sss.pgh.pa.us> <4A7F56A0.5060705@pjmodos.net> <4A7F5853.5010506@pjmodos.net> <20090920145011.GA24273@toroid.org> In-Reply-To: <20090920145011.GA24273@toroid.org> Content-Type: multipart/mixed; boundary="------------030008000809070403030104" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=AWL=-0.000, BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200909/1397 X-Sequence-Number: 146203 This is a multi-part message in MIME format. --------------030008000809070403030104 Content-Type: multipart/alternative; boundary="------------060403050400010005060209" --------------060403050400010005060209 Content-Type: text/plain; charset=windows-1250; format=flowed Content-Transfer-Encoding: 7bit Abhijit Menon-Sen wrote: > I have not yet been able to do a complete review of this patch, but I am > posting this because I'll be travelling for a week starting tomorrow. My > comments are based mostly on reading the patch, and not on any intensive > testing of the feature. I have left the patch status unchanged at "needs > review", although I think it's close to "ready for committer". > Thanks for your review. > 1. The patch did apply to HEAD and build cleanly, but there are now a > couple of minor (documentation) conflicts. (Sorry, I would have fixed > them and reposted a patch, but I'm running out of time right now.) > I fixed those conflicts in attached patch. > >> *** a/doc/src/sgml/ref/grant.sgml >> --- b/doc/src/sgml/ref/grant.sgml >> [...] >> >> >> + There is also the possibility of granting permissions to all objects of >> + given type inside one or multiple schemas. This functionality is supported >> + for tables, views, sequences and functions and can done by using >> + ALL {TABLES|SEQUENCES|FUNCTIONS} IN SCHEMA schemaname syntax in place >> + of object name. >> + >> + >> + >> > > 2. Here I suggest the following wording: > > > You can also grant permissions on all tables, sequences, or > functions that currently exist within a given schema by specifying > "ALL {TABLES|SEQUENCES|FUNCTIONS} IN SCHEMA schemaname" in place of > an object name. > > > 3. I believe MySQL's "grant all privileges on foo.* to someone" grants > privileges on all existing objects in foo _but also_ on any objects > that may be created later. This patch only gives you a way to grant > privileges only on the objects currently within a schema. I strongly > prefer this behaviour myself, but I do think the documentation needs > a brief mention of this fact, to avoid surprising people. That's why > I added "that currently exist" to (2), above. Maybe another sentence > that specifically says that objects created later are unaffected is > in order. I'm not sure. > I'll leave the exact wording to commiter, but in the attached patch I changed it to say "all existing objects" instead of "all objects". Except for above two changes and the fact that it's against current head, the patch is exactly the same. Thanks again. -- Regards Petr Jelinek (PJMODOS) --------------060403050400010005060209 Content-Type: text/html; charset=windows-1250 Content-Transfer-Encoding: 7bit Abhijit Menon-Sen wrote:
I have not yet been able to do a complete review of this patch, but I am
posting this because I'll be travelling for a week starting tomorrow. My
comments are based mostly on reading the patch, and not on any intensive
testing of the feature. I have left the patch status unchanged at "needs
review", although I think it's close to "ready for committer".
  
Thanks for your review.

1. The patch did apply to HEAD and build cleanly, but there are now a
   couple of minor (documentation) conflicts. (Sorry, I would have fixed
   them and reposted a patch, but I'm running out of time right now.)
  
I fixed those conflicts in attached patch.

  
*** a/doc/src/sgml/ref/grant.sgml
--- b/doc/src/sgml/ref/grant.sgml
[...]

    <para>
+    There is also the possibility of granting permissions to all objects of
+    given type inside one or multiple schemas. This functionality is supported
+    for tables, views, sequences and functions and can done by using
+    ALL {TABLES|SEQUENCES|FUNCTIONS} IN SCHEMA schemaname syntax in place
+    of object name.
+   </para>
+ 
+   <para>
    

2. Here I suggest the following wording:

    <para>
    You can also grant permissions on all tables, sequences, or
    functions that currently exist within a given schema by specifying
    "ALL {TABLES|SEQUENCES|FUNCTIONS} IN SCHEMA schemaname" in place of
    an object name.
    </para>

3. I believe MySQL's "grant all privileges on foo.* to someone" grants
   privileges on all existing objects in foo _but also_ on any objects
   that may be created later. This patch only gives you a way to grant
   privileges only on the objects currently within a schema. I strongly
   prefer this behaviour myself, but I do think the documentation needs
   a brief mention of this fact, to avoid surprising people. That's why
   I added "that currently exist" to (2), above. Maybe another sentence
   that specifically says that objects created later are unaffected is
   in order. I'm not sure.
  

I'll leave the exact wording to commiter, but in the attached patch I changed it to say "all existing objects" instead of "all objects".

Except for above two changes and the fact that it's against current head, the patch is exactly the same.

Thanks again.
-- 
Regards
Petr Jelinek (PJMODOS)
--------------060403050400010005060209-- --------------030008000809070403030104 Content-Type: application/x-tar; name="grantonall-2009-09-21.diff.gz" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="grantonall-2009-09-21.diff.gz" H4sICMhXt0oAA2dyYW50b25hbGwtMjAwOS0wOS0yMS5kaWZmAO1cfXfaOLP/m34KPT17b0ni Esw7TbfnuOCk3CXA2qTdPr17OMaIxDfGZm1om2373e+MZNkymJc02aa7fbJbbOtlNPMbaTQj yZ440yl5+vTSWRDreOLbx2EA/y5n7nFAp8eXgeUtCvhIxttyHznehH4kDcuik3G5UKhPi/ak Oi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