pgsql: Fix REASSIGN OWNED for text search objects

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix REASSIGN OWNED for text search objects
Date: 2014-07-15 17:28:14
Message-ID: E1X76WU-0007hc-Bi@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix REASSIGN OWNED for text search objects

Trying to reassign objects owned by a user that had text search
dictionaries or configurations used to fail with:
ERROR: unexpected classid 3600
or
ERROR: unexpected classid 3602

Fix by adding cases for those object types in a switch in pg_shdepend.c.

Both REASSIGN OWNED and text search objects go back all the way to 8.1,
so backpatch to all supported branches. In 9.3 the alter-owner code was
made generic, so the required change in recent branches is pretty
simple; however, for 9.2 and older ones we need some additional
reshuffling to enable specifying objects by OID rather than name.

Text search templates and parsers are not owned objects, so there's no
change required for them.

Per bug #9749 reported by Michal Novotný

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6bdf4b9c7dde84902a0cc19c27c51c016485b8e6

Modified Files
--------------
src/backend/catalog/pg_shdepend.c | 4 ++++
1 file changed, 4 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2014-07-15 18:07:03 pgsql: Add missing doc changes for ee80f043bc9b
Previous Message Tom Lane 2014-07-15 17:23:26 Re: pgsql: Move view reloptions into their own varlena struct