Re: bad message or bad privilege check in foreign key constraint

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: bad message or bad privilege check in foreign key constraint
Дата
Msg-id 4211.1201024574@sss.pgh.pa.us
обсуждение исходный текст
Ответ на bad message or bad privilege check in foreign key constraint  (hubert depesz lubaczewski <depesz@depesz.com>)
Ответы Re: bad message or bad privilege check in foreign key constraint  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-bugs
hubert depesz lubaczewski <depesz@depesz.com> writes:
> apparently revoking update rights on referencing table blocks deletes on master table:

>> revoke update on b from test;
> REVOKE

>> delete from a where id = 1;
> ERROR:  permission denied for relation b
> CONTEXT:  SQL statement "SELECT 1 FROM ONLY "public"."b" x WHERE $1 OPERATOR(pg_catalog.=) "a_id" FOR SHARE OF x"

Hmm.  I wonder why we are bothering with FOR SHARE locks on the
referencing table, when we don't have any intention to change
those rows.  Is there some race condition that's needed to prevent?

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: why provide cross type arithmetic operators
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: bad message or bad privilege check in foreign key constraint