Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 689c66a

Browse files
committed
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 1fa9241 commit 689c66a

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)