aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/tablecmds.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2023-08-29 08:52:22 +0200
committerPeter Eisentraut <peter@eisentraut.org>2023-08-29 08:52:22 +0200
commit689c66a84bb75e08462c05ffc18514895b19d48e (patch)
tree3cd736321cabf6392ecabefdf38ac754b21e672e /src/backend/commands/tablecmds.c
parent1fa9241bdd0e44d2b602b2dd4b6f0a4d0d402e76 (diff)
downloadpostgresql-689c66a84bb75e08462c05ffc18514895b19d48e.tar.gz
postgresql-689c66a84bb75e08462c05ffc18514895b19d48e.zip
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
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r--src/backend/commands/tablecmds.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index a8c40ace10c..48f17a34039 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -942,11 +942,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,