Re: GRANT ON ALL IN schema

Поиск
Список
Период
Сортировка
От Nikhil Sontakke
Тема Re: GRANT ON ALL IN schema
Дата
Msg-id a301bfd90907170254re7dd52es9fedb007376d8055@mail.gmail.com
обсуждение исходный текст
Ответ на Re: GRANT ON ALL IN schema  (Petr Jelinek <pjmodos@pjmodos.net>)
Ответы Re: GRANT ON ALL IN schema  (Petr Jelinek <pjmodos@pjmodos.net>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: Synch Rep for CommitFest 2009-07
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: GRANT ON ALL IN schema