The following bug has been logged online:

Bug reference:      4792
Logged by:          toni garcia
Email address:      agar...@at4.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);

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to