Re: referential integrity requires write permission to a table which only needs to be read

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: referential integrity requires write permission to a table which only needs to be read
Дата
Msg-id Pine.BSF.4.10.10008300705400.60082-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на referential integrity requires write permission to a table which only needs to be read  (pgsql-bugs@postgresql.org)
Список pgsql-bugs
On Wed, 30 Aug 2000 pgsql-bugs@postgresql.org wrote:

> Short Description
> referential integrity requires write permission to a table which only needs to be read

Yes, this is a known problem.

> And, why is the trigger trying to select WITH UPDATE? (locking?)
Yes, if you don't grab a row lock, another transaction can come
along and delete the row you're referencing after you've checked
it, but before that transaction sees that you've added a referencing
row (which could lead to orphened children)

> In any case, this is requiring us to grant update permission to this
> user group, and we really only want them to have select permission to
> the table in question.

Right now, the suggested workaround is to do a trigger before updates
that prevents the unwanted writes in plpgsql.  Not particularly good,
but functional until this gets fixed (and I don't know precisely when
that'll be)

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

Предыдущее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: inconsistent debug log output
Следующее
От: Tom Lane
Дата:
Сообщение: Re: inconsistent debug log output