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

Commit 6844d32

Browse files
committed
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. 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 689c66a commit 6844d32

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/backend/commands/tablecmds.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -944,11 +944,7 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
944944

945945
attr->attidentity = colDef->identity;
946946
attr->attgenerated = colDef->generated;
947-
948-
if (colDef->compression)
949-
attr->attcompression = GetAttributeCompression(attr->atttypid,
950-
colDef->compression);
951-
947+
attr->attcompression = GetAttributeCompression(attr->atttypid, colDef->compression);
952948
if (colDef->storage_name)
953949
attr->attstorage = GetAttributeStorage(attr->atttypid, colDef->storage_name);
954950
}

0 commit comments

Comments
 (0)