Re: bad message or bad privilege check in foreign key constraint - Mailing list pgsql-bugs

From Tom Lane
Subject Re: bad message or bad privilege check in foreign key constraint
Date
Msg-id 4211.1201024574@sss.pgh.pa.us
Whole thread Raw
In response to bad message or bad privilege check in foreign key constraint  (hubert depesz lubaczewski <depesz@depesz.com>)
Responses Re: bad message or bad privilege check in foreign key constraint
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: why provide cross type arithmetic operators
Next
From: Stephan Szabo
Date:
Subject: Re: bad message or bad privilege check in foreign key constraint