From: Nikhil Sontakke <nikhil.sontakke@enterprisedb.com>
To: Petr Jelinek <pjmodos@pjmodos.net>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: GRANT ON ALL IN schema
Date: Fri, 17 Jul 2009 15:24:55 +0530
Message-ID: <a301bfd90907170254re7dd52es9fedb007376d8055@mail.gmail.com> (raw)
In-Reply-To: <4A4DE104.8090605@pjmodos.net>
References: <4A37BF63.50008@pjmodos.net>
<4A37E122.8070303@pjmodos.net>
<4A38A956.8080600@pjmodos.net>
<4A4DE104.8090605@pjmodos.net>
Hi,
>
> Attached is v2 with slightly improved code, nothing has changed
> feature-wise.
>
Here are some comments on this patch from my side:
grant.sgml
* Maybe we should use
<replaceable class="parameter">schemaname</replaceable> in the sgml
references instead of just <replaceable>schemaname</replaceable>
+ There is also the posibility 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 IN schemanema syntax in place of object name.
+ </para>
+
+ <para>
typo "posibility"
It should be ALL [TABLES|VIEWS|SEQUENCES|FUNCTIONS} IN schemaname
(note the other typo here) syntax to be precise IMHO.
aclchk.c
+ elog(ERROR, "unrecognized GrantStmt.objtype: %d",
+ (int) objtype);
Kinda funny to mention the C structure name in the error. But I see
that the other functions in the file do the same, so should be ok. I
doubt if the syntax allows any other object type to reach upto this
function anyways :)
parsenodes.h
GrantObjectType objtype; /* kind of object being operated on */
+ bool is_schema; /* if true we want all objects
+ * of objtype in schema */
You forgot to make changes in _copyGrantStmt and _equalGrantStmt to
account for this new field.
Rest of the changes look straightforward and ok to me. make
installcheck passes cleanly too. I also do not see any new warnings
due to this patch.
As an aside, I was just wondering the behaviour for RELKIND_INDEX?
Regards,
Nikhils
--
http://www.enterprisedb.com
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nikhil.sontakke@enterprisedb.com, pjmodos@pjmodos.net
Subject: Re: GRANT ON ALL IN schema
In-Reply-To: <a301bfd90907170254re7dd52es9fedb007376d8055@mail.gmail.com>
* 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