]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix REASSIGN OWNED for text search objects
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 15 Jul 2014 17:24:07 +0000 (13:24 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 15 Jul 2014 17:24:07 +0000 (13:24 -0400)
commita41dc73211c9ab579bb2cd87ad7d0a6ecf0806fe
tree60dbe7a4ec2b617f3841748d8af4e0049b01b0f2
parent8ebf5f7206e0e4c5d4113cf67d3db8f2a90d7e0f
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ý
src/backend/catalog/pg_shdepend.c
src/backend/commands/tsearchcmds.c
src/include/commands/defrem.h