git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 689c66a)
Remove useless if condition
2023年8月29日 06:58:56 +0000 (08:58 +0200)
2023年8月29日 06:58:56 +0000 (08:58 +0200)
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


diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 48f17a340392e8723aaa5969b97d5b848f3f9821..d097da3c78e09b15d6196eb2eb4e391093ebaaae 100644 (file)
--- 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);
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /