Skip site navigation (1) Skip section navigation (2)

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: depesz(at)depesz(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org, Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Subject: Re: bad message or bad privilege check in foreign key constraint
Date: 2008-01-22 17:56:14
Message-ID: 4211.1201024574@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
hubert depesz lubaczewski <depesz(at)depesz(dot)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

In response to

Responses

pgsql-bugs by date

Next:From: Adam HardyDate: 2008-01-22 23:42:17
Subject: BUG #3894: JDBC DatabaseMetaData.getTables is inconsistently case-sensitive with schema name
Previous:From: Tom LaneDate: 2008-01-22 17:42:58
Subject: Re: why provide cross type arithmetic operators

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group