BUG #4792: odd behavior revoking perms on an owned table

From: "toni garcia" <agarcia(at)at4(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4792: odd behavior revoking perms on an owned table
Date: 2009-05-05 09:59:59
Message-ID: 200905050959.n459xxhe060108@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 4792
Logged by: toni garcia
Email address: agarcia(at)at4(dot)net
PostgreSQL version: 8.2.7
Operating system: gentoo linux
Description: odd behavior revoking perms on an owned table
Details:

Sorry, I cannot test on 8.2.13, but I'm including full SQL so you can
quickly try reproducing the bug:

#psql -U postgres template1

CREATE DATABASE test_db;
CREATE USER test_user;
\c test_db test_user
CREATE TABLE test (id integer primary key);
CREATE TABLE test_fk (id integer primary key, testid integer, constraint fk1
foreign key (testid) references test(id));
REVOKE UPDATE ON test FROM test_user ;
INSERT INTO test VALUES (1);
INSERT INTO test_fk VALUES (1,1);

Last sentence fails with message:
ERROR: permiso denegado para la relaciest
CONTEXT: sentencia SQL: «SELECT 1 FROM ONLY "public"."test" x WHERE "id" =
$1 FOR SHARE OF x»

If you change owner for table 'test' then it works:

\c - postgres
ALTER TABLE test OWNER TO postgres;
\c - test_user
INSERT INTO test_fk VALUES (1,1);

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Christian Iversen 2009-05-05 10:00:43 Re: BUG #4791: NULL value in function causes reproducible segmentation fault
Previous Message Magnus Hagander 2009-05-05 09:37:47 Re: BUG #4791: NULL value in function causes reproducible segmentation fault