Re: Simplify calls of pg_class_aclcheck when multiple modes are used

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Simplify calls of pg_class_aclcheck when multiple modes are used
Дата
Msg-id 5446BBFD.80502@gmx.net
обсуждение исходный текст
Ответ на Simplify calls of pg_class_aclcheck when multiple modes are used  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Simplify calls of pg_class_aclcheck when multiple modes are used
Список pgsql-hackers
On 8/27/14 8:02 AM, Michael Paquier wrote:
> In a couple of code paths we do the following to check permissions on an
> object:
> if (pg_class_aclcheck(relid, userid, ACL_USAGE) != ACLCHECK_OK &&
>     pg_class_aclcheck(relid, userid, ACL_UPDATE) != ACLCHECK_OK)
>     ereport(ERROR, blah);
>
> Wouldn't it be better to simplify that with a single call of
> pg_class_aclcheck, gathering together the modes that need to be checked?

Yes, it's probably just an oversight.

While looking at this, I wrote a few tests cases for sequence
privileges, because that was not covered at all.  That patch is attached.

That led me to discover this issue:
http://www.postgresql.org/message-id/5446B819.1020600@gmx.net

I'll wait for the resolution of that and then commit this.


Вложения

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

Предыдущее
От: "Brightwell, Adam"
Дата:
Сообщение: Re: Directory/File Access Permissions for COPY and Generic File Access Functions
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Allow format 0000-0000-0000 in postgresql MAC parser