Correct constness of system attributes in heap.c & prerequisites.
Andres Freund <andres@anarazel.de>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/heap.c | modified | +11 −11 |
| src/backend/catalog/index.c | modified | +1 −1 |
| src/backend/executor/spi.c | modified | +2 −2 |
| src/backend/optimizer/util/plancat.c | modified | +1 −1 |
| src/backend/parser/parse_relation.c | modified | +4 −4 |
| src/backend/parser/parse_utilcmd.c | modified | +1 −1 |
| src/backend/utils/adt/expandedrecord.c | modified | +7 −6 |
| src/backend/utils/adt/name.c | modified | +1 −1 |
| src/include/catalog/heap.h | modified | +2 −2 |
| src/include/parser/parse_relation.h | modified | +1 −1 |
| src/include/utils/builtins.h | modified | +1 −1 |
Discussion
- Large writable variables 51 messages · 2018-10-15 → 2018-10-25