Fix event trigger support for the new ALTER OPERATOR command.

Also, the lock on pg_operator should not be released until end of
transaction.
This commit is contained in:
Heikki Linnakangas 2015-07-14 19:50:18 +03:00
parent 321eed5f0f
commit d5c0495cd4
1 changed files with 6 additions and 1 deletions

View File

@ -38,6 +38,7 @@
#include "access/htup_details.h"
#include "catalog/dependency.h"
#include "catalog/indexing.h"
#include "catalog/objectaccess.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_type.h"
#include "commands/alter.h"
@ -499,7 +500,11 @@ AlterOperator(AlterOperatorStmt *stmt)
simple_heap_update(catalog, &tup->t_self, tup);
CatalogUpdateIndexes(catalog, tup);
heap_close(catalog, RowExclusiveLock);
InvokeObjectPostAlterHook(OperatorRelationId, oprId, 0);
ObjectAddressSet(address, OperatorRelationId, oprId);
heap_close(catalog, NoLock);
return address;
}