Re: LOCK TABLE Permissions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: LOCK TABLE Permissions
Дата
Msg-id 8307.1374251582@sss.pgh.pa.us
обсуждение исходный текст
Ответ на LOCK TABLE Permissions  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: LOCK TABLE Permissions  (Robert Haas <robertmhaas@gmail.com>)
Re: LOCK TABLE Permissions  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:

>     if (lockmode == AccessShareLock)
>         aclresult = pg_class_aclcheck(reloid, GetUserId(),
>                                       ACL_SELECT);
> +   else if (lockmode == RowExclusiveLock)
> +       aclresult = pg_class_aclcheck(reloid, GetUserId(),
> +                        ACL_INSERT | ACL_UPDATE | ACL_DELETE | ACL_TRUNCATE);
>     else
>         aclresult = pg_class_aclcheck(reloid, GetUserId(),
>                                       ACL_UPDATE | ACL_DELETE | ACL_TRUNCATE);

Perhaps it would be better to refactor with a local variable for the
aclmask and just one instance of the pg_class_aclcheck call.  Also, I'm
pretty sure that the documentation work needed is more extensive
than the actual patch ;-).  Otherwise, I don't see a problem with this.
        regards, tom lane



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: getting rid of SnapshotNow
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: AGG_PLAIN thinks sorts are free