BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type

From: cpacejo(at)clearskydata(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type
Date: 2015-10-07 14:25:30
Message-ID: 20151007142530.8425.57690@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: 13666
Logged by: Chris Pacejo
Email address: cpacejo(at)clearskydata(dot)com
PostgreSQL version: 9.4.4
Operating system: CentOS 7 (kernel 3.10.0-123.el7.x86_64)
Description:

=# CREATE TYPE foo AS (a integer, b integer);

=# ALTER TYPE foo OWNER TO user1;

=# SELECT typowner, relowner FROM pg_type JOIN pg_class ON typrelid =
relfilenode WHERE typname = 'foo';
-[ RECORD 1 ]---
typowner | 16384
relowner | 16384

=# REASSIGN OWNED BY user1 TO user2;

=# SELECT typowner, relowner FROM pg_type JOIN pg_class ON typrelid =
relfilenode WHERE typname = 'foo';
-[ RECORD 1 ]---
typowner | 8713825
relowner | 16384

This prevents user2 from being able to modify 'foo':

=> ALTER TYPE foo RENAME ATTRIBUTE b TO c;
ERROR: must be owner of relation foo

Furthermore, while trying to replicate in another database, I encountered:

=# REASSIGN OWNED BY user1 TO user2;
ERROR: unexpected classid 1418

Not sure if this is related or not.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2015-10-07 17:01:54 Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type
Previous Message Kevin Grittner 2015-10-07 14:24:31 Re: BUG #13660: serializable snapshotting hangs