Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 689c66a

Browse filesBrowse 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
Copy full SHA for 689c66a

File tree

Expand file treeCollapse file tree

1 file changed

+2
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-5
lines changed

‎src/backend/commands/tablecmds.c

Copy file name to clipboardExpand all lines: src/backend/commands/tablecmds.c
+2-5Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.