aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2023-08-29 08:58:56 +0200
committerPeter Eisentraut <peter@eisentraut.org>2023-08-29 08:58:56 +0200
commit6844d3275ac6b3c35d824f49362d3fe59b30f26b (patch)
tree00aec58aa8d096cd3d4c8afb2eac478db8b6966b /src
parent689c66a84bb75e08462c05ffc18514895b19d48e (diff)
downloadpostgresql-6844d3275ac6b3c35d824f49362d3fe59b30f26b.tar.gz
postgresql-6844d3275ac6b3c35d824f49362d3fe59b30f26b.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/backend/commands/tablecmds.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 48f17a34039..d097da3c78e 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -944,11 +944,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);
}