From bc02f8c2ec75b989c894b71b860b3e7ce2cc7029 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 27 Jun 2023 11:30:05 +0200 Subject: [PATCH 10/17] Remove useless if condition We can call GetAttributeCompression() with a NULL argument. It handles that internally already. This change makes all the callers of GetAttributeCompression() uniform. --- src/backend/commands/tablecmds.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 5400d37b5e..4e6310886f 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -929,11 +929,7 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId, attr->attidentity = colDef->identity; attr->attgenerated = colDef->generated; - - if (colDef->compression) - attr->attcompression = GetAttributeCompression(attr->atttypid, - colDef->compression); - + attr->attcompression = GetAttributeCompression(attr->atttypid, colDef->compression); if (colDef->storage_name) attr->attstorage = GetAttributeStorage(attr->atttypid, colDef->storage_name); } -- 2.41.0