From eea7f17ebddd1635c0dab90ef7e3e818300b6069 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 27 Jun 2023 11:24:05 +0200 Subject: [PATCH 09/17] Remove useless if condition This is useless because these fields are not set anywhere before, so we can assign them unconditionally. This also makes this more consistent with ATExecAddColumn(). --- src/backend/commands/tablecmds.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 031b2dc423..5400d37b5e 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -927,11 +927,8 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId, attr->atthasdef = true; } - if (colDef->identity) - attr->attidentity = colDef->identity; - - if (colDef->generated) - attr->attgenerated = colDef->generated; + attr->attidentity = colDef->identity; + attr->attgenerated = colDef->generated; if (colDef->compression) attr->attcompression = GetAttributeCompression(attr->atttypid, -- 2.41.0