aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/sequence.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2017-05-31 17:03:10 -0700
committerAndres Freund <andres@anarazel.de>2017-06-01 14:19:33 -0700
commit665104557fdc25788a6d54ab271ed818bec18598 (patch)
tree76d39b78f94be1c68dac5b35a7a367061fb418fe /src/backend/commands/sequence.c
parent3d79013b970d4cc336c06eb77ed526b44308c03e (diff)
downloadpostgresql-665104557fdc25788a6d54ab271ed818bec18598.tar.gz
postgresql-665104557fdc25788a6d54ab271ed818bec18598.zip
Modify sequence catalog tuple before invoking post alter hook.
This seems to have been broken in the commit (1753b1b027035029) 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
Diffstat (limited to 'src/backend/commands/sequence.c')
-rw-r--r--src/backend/commands/sequence.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c
index 4a56f03e8b6..7e85b69ab8f 100644
--- a/src/backend/commands/sequence.c
+++ b/src/backend/commands/sequence.c
@@ -490,12 +490,12 @@ AlterSequence(ParseState *pstate, AlterSeqStmt *stmt)
if (owned_by)
process_owned_by(seqrel, owned_by, stmt->for_identity);
+ CatalogTupleUpdate(rel, &seqtuple->t_self, seqtuple);
+
InvokeObjectPostAlterHook(RelationRelationId, relid, 0);
ObjectAddressSet(address, RelationRelationId, relid);
- CatalogTupleUpdate(rel, &seqtuple->t_self, seqtuple);
-
heap_close(rel, RowExclusiveLock);
relation_close(seqrel, NoLock);