Re: Solution for RI permission problem

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Solution for RI permission problem
Дата
Msg-id Pine.BSF.4.10.10010011119530.10491-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Solution for RI permission problem  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Solution for RI permission problem  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On Wed, 20 Sep 2000, Peter Eisentraut wrote:

> Here's what I've come up with to avoid "permission denied" errors when a
> RI trigger has to lock a PK table.  Whenever the SELECT FOR UPDATE is
> executed I temporarily switch the current user id to the owner of the PK
> table.  It's not the grand unified solution via setuid functions that was
> envisioned now and then, but it does the same conceptually.  For a
> terminally elegant solution I can only suggest not using the SPI
> interface.
> 
> I recommend this patch to be checked out by someone knowledgeable in the
> RI area.

It seems to be working on my system (and you don't need to give any access
to the pk table to the user).

With that, I do have a general question though. Are referential actions
supposed to be limited by the permissions of the user executing the query?
So, if you for example have write access on the pk table, but not to the
fk table, and there is a on cascade delete relationship, should that user
not be able to delete from the pk table?



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: What do I need to be able to compile the source in Win32
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Unruly rules