mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
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
This commit is contained in:
@@ -125,7 +125,7 @@ extern void expandRTE(RangeTblEntry *rte, int rtindex, int sublevels_up,
|
||||
extern List *expandRelAttrs(ParseState *pstate, RangeTblEntry *rte,
|
||||
int rtindex, int sublevels_up, int location);
|
||||
extern int attnameAttNum(Relation rd, const char *attname, bool sysColOK);
|
||||
extern Name attnumAttName(Relation rd, int attid);
|
||||
extern const NameData *attnumAttName(Relation rd, int attid);
|
||||
extern Oid attnumTypeId(Relation rd, int attid);
|
||||
extern Oid attnumCollationId(Relation rd, int attid);
|
||||
extern bool isQueryUsingTempRelation(Query *query);
|
||||
|
Reference in New Issue
Block a user