pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: bashtanov@imap.cc
To: pgsql-bugs@postgresql.org
Subject: BUG #9923: "reassign owned" does not change permissions grantor
Date: Wed, 09 Apr 2014 05:12:46 +0000
Message-ID: <20140409051246.15796.35010@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      9923
Logged by:          Alexey Bashtanov
Email address:      bashtanov@imap.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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (10+ messages)  latest in thread

Message-ID: <20140409051246.15796.35010@wrigleys.postgresql.org>
Permalink:  ../20140409051246.15796.35010@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20140409051246.15796.35010@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: bashtanov@imap.cc
  Subject: Re: BUG #9923: "reassign owned" does not change permissions grantor
  In-Reply-To: <20140409051246.15796.35010@wrigleys.postgresql.org>
  References: <20140409051246.15796.35010@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox