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

Поиск
Список
Период
Сортировка
От toni garcia
Тема BUG #4792: odd behavior revoking perms on an owned table
Дата
Msg-id 200905050959.n459xxhe060108@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #4792: odd behavior revoking perms on an owned table
Список pgsql-bugs
The following bug has been logged online:

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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: BUG #4791: NULL value in function causes reproducible segmentation fault
Следующее
От: Christian Iversen
Дата:
Сообщение: Re: BUG #4791: NULL value in function causes reproducible segmentation fault