Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 0550414E23D5 for ; Wed, 21 Dec 2011 13:10:45 -0400 (AST) Received: from smtp.msys.ch ([157.161.101.10] helo=sleipnir.msys.ch) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RdPgh-0006bN-AQ for pgsql-bugs@postgresql.org; Wed, 21 Dec 2011 17:10:44 +0000 Received: from mail.msys.ch (smtp.msys.ch [157.161.101.10]) by sleipnir.msys.ch (8.14.3/8.14.3) with ESMTP id pBLH9ELF009611 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 21 Dec 2011 18:09:14 +0100 (CET) Received: from macbook.vnode.ch (macbook.vnode.ch [62.12.170.149] (may be forged)) (authenticated bits=0) by mail.msys.ch (8.14.3/8.14.1) with ESMTP id pBLH9EDB023514 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 21 Dec 2011 18:09:14 +0100 (CET) Message-ID: <4EF212BA.1010104@msys.ch> Date: Wed, 21 Dec 2011 18:09:14 +0100 From: Marc Balmer Organization: micro systems User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: script for #6350 X-Enigmail-Version: 1.3.4 Content-Type: multipart/mixed; boundary="------------060504030500030202020200" X-SMTP-Vilter-Version: 1.3.6 X-Spamd-Symbols: AWL,RCVD_IN_DNSWL_LOW X-Pg-Spam-Score: -5.2 (-----) X-Archive-Number: 201112/196 X-Sequence-Number: 32007 This is a multi-part message in MIME format. --------------060504030500030202020200 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Attached script (run as psql -U postgres -f bug_6350.sql) shows the problem. Enjoy! --------------060504030500030202020200 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="bug_6350.sql" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bug_6350.sql" 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; --------------060504030500030202020200--