BUG #9923: "reassign owned" does not change permissions grantor

From: bashtanov(at)imap(dot)cc
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #9923: "reassign owned" does not change permissions grantor
Date: 2014-04-09 05:12:46
Message-ID: 20140409051246.15796.35010@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 9923
Logged by: Alexey Bashtanov
Email address: bashtanov(at)imap(dot)cc
PostgreSQL version: 9.3.1
Operating system: CentOS 6.4
Description:

Hello!

"Alter ... owner to ..." statement changes the permissions grantor but
"reassign owned ..." does not.

[ACTIONS]
1. create a type, give it some permissions. Get something like this:

test_bash_20140408=# select (select rolname from pg_roles where oid =
typowner), typacl from pg_type where oid = 'foo'::regtype;
rolname | typacl
---------+---------
ro | {=U/ro}
(1 row)

2. reassign owned by its owner to some other user:
test_bash_20140408=# reassign owned by ro to test_ui;
REASSIGN OWNED

[EXPECTED]
new permissions grantor is the new owner:

test_bash_20140408=# select (select rolname from pg_roles where oid =
typowner), typacl from pg_type where oid = 'foo'::regtype;
rolname | typacl
---------+---------
test_ui | {=U/test_ui}
(1 row)

[RECIEVED]
permissions grantor was left the same:

test_bash_20140408=# select (select rolname from pg_roles where oid =
typowner), typacl from pg_type where oid = 'foo'::regtype;
rolname | typacl
---------+---------
test_ui | {=U/ro}
(1 row)

Additionally, these ACLs cannot be pg_restored after pg_dumped

BTW is the expected behavior documented? I could not find this in docs.

Regards,
Alexey Bashtanov

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexey Bashtanov 2014-04-09 07:35:09 Re: BUG #9923: "reassign owned" does not change permissions grantor
Previous Message Bruce Momjian 2014-04-09 01:05:09 Re: BUG #9843: interval data type storage size (8.1 later)