Remove useless initializations
authorPeter Eisentraut <[email protected]>
Mon, 1 Jul 2024 06:50:10 +0000 (08:50 +0200)
committerPeter Eisentraut <[email protected]>
Mon, 1 Jul 2024 06:50:10 +0000 (08:50 +0200)
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 <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/a368248e-69e4-40be-9c07-6c3b5880b0a6@eisentraut.org

src/backend/utils/cache/relcache.c

index 930cc03ee20b10262815f7c879494e2576593882..66ed24e4012763ff7021d43a04e73e3e93556e53 100644 (file)
@@ -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).