From: Peter Eisentraut Date: Mon, 1 Jul 2024 06:50:10 +0000 (+0200) Subject: Remove useless initializations X-Git-Tag: REL_18_BETA1~2513 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=da2aeba8f53379e84a8f3f656b6c2ffe5878eff5;p=postgresql.git Remove useless initializations The struct is already initialized to all zeros right before this, and randomly initializing a few but not all fields to zero again has no technical or educational value. Reviewed-by: Tomasz Rybak Discussion: https://www.postgresql.org/message-id/flat/a368248e-69e4-40be-9c07-6c3b5880b0a6@eisentraut.org --- diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 930cc03ee20..66ed24e4012 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -536,8 +536,6 @@ RelationBuildTupleDesc(Relation relation) constr = (TupleConstr *) MemoryContextAllocZero(CacheMemoryContext, sizeof(TupleConstr)); - constr->has_not_null = false; - constr->has_generated_stored = false; /* * Form a scan key that selects only user attributes (attnum > 0).