From 02a30a09f9e57a29f7bda82f5f4bfc214eed3980 Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Tue, 16 Oct 2018 09:44:43 -0700 Subject: 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 --- src/backend/parser/parse_utilcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/parser/parse_utilcmd.c') diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 42bf9bfec62..d8387d43569 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -2065,7 +2065,7 @@ transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt) for (i = 0; i < index_form->indnatts; i++) { int16 attnum = index_form->indkey.values[i]; - Form_pg_attribute attform; + const FormData_pg_attribute *attform; char *attname; Oid defopclass; -- cgit v1.2.3