Re: role self-revocation

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: role self-revocation
Дата
Msg-id CA+TgmobzLNnY8F24q-goB6qAkFW55JVKtDb+mNXC-hziMwOQUw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: role self-revocation  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: role self-revocation  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
On Sun, Mar 6, 2022 at 11:34 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I was thinking the former ... however, after a bit of experimentation
> I see that we accept "grant foo to bar granted by baz" a VERY long
> way back, but the "granted by" option for object privileges is
> (a) pretty new and (b) apparently restrictively implemented:
>
> regression=# grant delete on alices_table to bob granted by alice;
> ERROR:  grantor must be current user
>
> That's ... surprising.  I guess whoever put that in was only
> interested in pro-forma SQL syntax compliance and not in making
> a usable feature.

It appears so: https://www.postgresql.org/message-id/2073b6a9-7f79-5a00-5f26-cd19589a52c7%402ndquadrant.com

It doesn't seem like that would be hard to fix. Maybe we should just do that.

> So if we decide to extend this change into object privileges
> it would be advisable to use SET ROLE, else we'd be giving up
> an awful lot of backwards compatibility in dump scripts.
> But if we're only talking about role grants then I think
> GRANTED BY would work fine.

OK.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: New developer papercut - Makefile references INSTALL
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Column Filtering in Logical Replication