From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Correct constness of system attributes in heap.c & prerequisites
Date: Tue, 16 Oct 2018 16:45:31 +0000
Message-ID: <E1gCSTL-0000Nb-Eo@gemulon.postgresql.org> (raw)
Correct constness of system attributes in heap.c & prerequisites.
This allows the compiler / linker to mark affected pages as read-only.
There's a fair number of pre-requisite changes, to allow the const
properly be propagated. Most of consts were already required for
correctness anyway, just not represented on the type-level. Arguably
we could be more aggressive in using consts in related code, but..
This requires using a few of the types underlying typedefs that
removes pointers (e.g. const NameData *) as declaring the typedefed
type constant doesn't have the same meaning (it makes the variable
const, not what it points to).
Discussion: https://postgr.es/m/20181015200754.7y7zfuzsoux2c4ya@alap3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/02a30a09f9e57a29f7bda82f5f4bfc214eed3980
Modified Files
--------------
src/backend/catalog/heap.c | 22 +++++++++++-----------
src/backend/catalog/index.c | 2 +-
src/backend/executor/spi.c | 4 ++--
src/backend/optimizer/util/plancat.c | 2 +-
src/backend/parser/parse_relation.c | 8 ++++----
src/backend/parser/parse_utilcmd.c | 2 +-
src/backend/utils/adt/expandedrecord.c | 13 +++++++------
src/backend/utils/adt/name.c | 2 +-
src/include/catalog/heap.h | 4 ++--
src/include/parser/parse_relation.h | 2 +-
src/include/utils/builtins.h | 2 +-
11 files changed, 32 insertions(+), 31 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: andres@anarazel.de
Subject: Re: pgsql: Correct constness of system attributes in heap.c & prerequisites
In-Reply-To: <E1gCSTL-0000Nb-Eo@gemulon.postgresql.org>
References: <E1gCSTL-0000Nb-Eo@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox