pgsql: adjust ACL owners for REASSIGN and ALTER OWNER TO

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: adjust ACL owners for REASSIGN and ALTER OWNER TO
Date: 2015-12-21 22:18:51
Message-ID: E1aB8n5-00006U-Rt@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

adjust ACL owners for REASSIGN and ALTER OWNER TO

When REASSIGN and ALTER OWNER TO are used, both the object owner and ACL
list should be changed from the old owner to the new owner. This patch
fixes types, foreign data wrappers, and foreign servers to change their
ACL list properly; they already changed owners properly.

Report by Alexey Bashtanov

This is a backpatch of commit 59367fdf97c (for bug #9923) by Bruce
Momjian to branches 9.1 - 9.4; it wasn't backpatched originally out of
concerns that it would create a backwards compatibility problem, but per
discussion related to bug #13666 that turns out to have been misguided.
(Therefore, the entry in the 9.5 release notes should be removed.)

Note that 9.1 didn't have privileges on types (which were introduced by
commit 729205571e81), so this commit only changes foreign-data related
objects in that branch.

Discussion: http://www.postgresql.org/message-id/20151216224004.GL2618@alvherre.pgsql
http://www.postgresql.org/message-id/10227.1450373793@sss.pgh.pa.us

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/62e6eba8d26618e1a20cf29a94c1ce6d68d40f4e

Modified Files
--------------
src/backend/commands/foreigncmds.c | 56 ++++++++++++++-
src/backend/commands/typecmds.c | 65 ++++++++++++++---
src/test/regress/expected/foreign_data.out | 104 ++++++++++++++--------------
3 files changed, 161 insertions(+), 64 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2015-12-21 22:53:26 pgsql: Rework internals of changing a type's ownership
Previous Message Tom Lane 2015-12-21 20:09:02 pgsql: Fix calculation of space needed for parsed words in tab completi