summaryrefslogtreecommitdiff
path: root/src/backend/optimizer
diff options
context:
space:
mode:
authorAndres Freund2018-10-16 16:44:43 +0000
committerAndres Freund2018-10-16 16:44:43 +0000
commit02a30a09f9e57a29f7bda82f5f4bfc214eed3980 (patch)
tree7e47acc68b2ddfcc4d45dbd723f5ea9b31c3e0d5 /src/backend/optimizer
parentc015ccb306ec81bca3023818c9cf0113cae25be1 (diff)
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
Diffstat (limited to 'src/backend/optimizer')
-rw-r--r--src/backend/optimizer/util/plancat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c
index 8369e3ad62d..46de00460d9 100644
--- a/src/backend/optimizer/util/plancat.c
+++ b/src/backend/optimizer/util/plancat.c
@@ -1692,7 +1692,7 @@ build_index_tlist(PlannerInfo *root, IndexOptInfo *index,
if (indexkey != 0)
{
/* simple column */
- Form_pg_attribute att_tup;
+ const FormData_pg_attribute *att_tup;
if (indexkey < 0)
att_tup = SystemAttributeDefinition(indexkey,