Attached script (run as psql -U postgres -f bug_6350.sql) shows the
problem.  Enjoy!

create database problematic;
\c problematic

-- create three roles
create role usr;
create role adm;
create role new_adm;

create table foo (bar integer);
alter table foo owner to adm;

grant select(bar) on foo to usr;

-- all ok so far, usr and adm are referenced in
-- the foo.bar column privileges

\dp foo

-- now change the owner
alter table foo owner to new_adm;

-- the following drop succeds, although role adm
-- is still referenced in the foo.bar column
-- privileges.  this is a bug.

drop role adm;

\dp foo

-- the column privileges can now not be changed
-- due to the stale reference to the deleted role.

revoke select(bar) on foo from usr;

\dp foo

\c template1
drop database problematic;

-- 
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