1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-21 10:42:50 +03:00

Modify sequence catalog tuple before invoking post alter hook.

This seems to have been broken in the commit (1753b1b027) that
moved the sequence definition into pg_sequence.

Author: Andres Freund
Discussion: https://postgr.es/m/20170601000716.qxg7c46ukkiljjb3@alap3.anarazel.de
Backpatch: Bug is in master/v10 only
This commit is contained in:
Andres Freund
2017-05-31 17:03:10 -07:00
parent 3d79013b97
commit 665104557f

View File

@@ -490,12 +490,12 @@ AlterSequence(ParseState *pstate, AlterSeqStmt *stmt)
if (owned_by) if (owned_by)
process_owned_by(seqrel, owned_by, stmt->for_identity); process_owned_by(seqrel, owned_by, stmt->for_identity);
CatalogTupleUpdate(rel, &seqtuple->t_self, seqtuple);
InvokeObjectPostAlterHook(RelationRelationId, relid, 0); InvokeObjectPostAlterHook(RelationRelationId, relid, 0);
ObjectAddressSet(address, RelationRelationId, relid); ObjectAddressSet(address, RelationRelationId, relid);
CatalogTupleUpdate(rel, &seqtuple->t_self, seqtuple);
heap_close(rel, RowExclusiveLock); heap_close(rel, RowExclusiveLock);
relation_close(seqrel, NoLock); relation_close(seqrel, NoLock);