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

Re: PostgreSQL BugTool Submission

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: PostgreSQL BugTool Submission
Date: 2000-08-22 21:14:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
On Tue, 22 Aug 2000 pgsql-bugs(at)postgresql(dot)org wrote:

> James Aspnes (aspnes(at)cs(dot)yale(dot)edu) reports a bug with a severity of 2
> The lower the number the more severe it is.
> Short Description
> checking foreign keys requires write access
> Long Description
> In version 7.0.2, create tables A and B where B has a foreign
> key reference to A.  Grant user X insert access on B but only
> select access on A.  Attempts by X to insert into B will fail
> with an access error on A, even though X is allowed to read A
> (and thus verify that the foreign key constraint is not violated.)[B

Yes.  This is a known issue due to getting row level locks
on rows in A with SELECT ... FOR UPDATE which requires update
permission (and presumably select as well).  For more information,
check out the -hackers archive over the last couple of months.

The current workaround is somewhat painful, and involves giving 
update permission and using a trigger to actually prevent unwanted

In response to

pgsql-bugs by date

Next:From: pgsql-bugsDate: 2000-08-22 21:49:47
Subject: PostgreSQL BugTool Submission
Previous:From: pgsql-bugsDate: 2000-08-22 19:36:29
Subject: PostgreSQL BugTool Submission

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