v0-0003-Remove-useless-initializations.patch

text/plain

Filename: v0-0003-Remove-useless-initializations.patch
Type: text/plain
Part: 2
Message: Virtual generated columns

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: format-patch
Series: patch v0-0003
Subject: Remove useless initializations
File+
src/backend/utils/cache/relcache.c 0 2
From 037ca235379e7d1ca47af3b3f980cb21d22ab061 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Mon, 29 Apr 2024 09:46:43 +0200
Subject: [PATCH v0 3/5] 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.
---
 src/backend/utils/cache/relcache.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 262c9878dd3..05c4ae79707 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -535,8 +535,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).
-- 
2.44.0