diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index a9391e1b9fd..8b91453dd54 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -387,6 +387,9 @@ generateSerialExtraStmts(CreateStmtContext *cxt, ColumnDef *column, AlterSeqStmt *altseqstmt; List *attnamelist; + /* Make a copy of this as we may end up modifying it in the code below */ + seqoptions = list_copy(seqoptions); + /* * Determine namespace and name to use for the sequence. *