Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e45229b

Browse files
committed
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ý
1 parent 5e4c9b3 commit e45229b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/backend/catalog/pg_shdepend.c

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
#include "catalog/pg_proc.h"
4141
#include "catalog/pg_shdepend.h"
4242
#include "catalog/pg_tablespace.h"
43+
#include "catalog/pg_ts_config.h"
44+
#include "catalog/pg_ts_dict.h"
4345
#include "catalog/pg_type.h"
4446
#include "commands/alter.h"
4547
#include "commands/dbcommands.h"
@@ -1394,6 +1396,8 @@ shdepReassignOwned(List *roleids, Oid newrole)
13941396
case ExtensionRelationId:
13951397
case TableSpaceRelationId:
13961398
case DatabaseRelationId:
1399+
case TSConfigRelationId:
1400+
case TSDictionaryRelationId:
13971401
{
13981402
Oid classId = sdepForm->classid;
13991403
Relation catalog;

0 commit comments

Comments
 (0)