Skip to content

Commit 93cc896

Browse files
peterepull[bot]
authored andcommitted
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(). Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://www.postgresql.org/message-id/flat/52a125e4-ff9a-95f5-9f61-b87cf447e4da@eisentraut.org
1 parent a7f379f commit 93cc896

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/backend/commands/tablecmds.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -942,11 +942,8 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
942942
attr->atthasdef = true;
943943
}
944944

945-
if (colDef->identity)
946-
attr->attidentity = colDef->identity;
947-
948-
if (colDef->generated)
949-
attr->attgenerated = colDef->generated;
945+
attr->attidentity = colDef->identity;
946+
attr->attgenerated = colDef->generated;
950947

951948
if (colDef->compression)
952949
attr->attcompression = GetAttributeCompression(attr->atttypid,

0 commit comments

Comments
 (0)