PostgreSQL Source Code: src/include/catalog/heap.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef HEAP_H

15#define HEAP_H

16

20

21

22

23#define CHKATYPE_ANYARRAY 0x01

24#define CHKATYPE_ANYRECORD 0x02

25#define CHKATYPE_IS_PARTKEY 0x04

26#define CHKATYPE_IS_VIRTUAL 0x08

27

29{

32 char generated;

34

36{

38

39 Oid conoid;

40 char *name;

42 Node *expr;

43 bool is_enforced;

45 bool is_local;

46 int16 inhcount;

47 bool is_no_inherit;

48

50

52 Oid relnamespace,

53 Oid reltablespace,

54 Oid relid,

56 Oid accessmtd,

58 char relkind,

59 char relpersistence,

60 bool shared_relation,

61 bool mapped_relation,

62 bool allow_system_table_mods,

65 bool create_storage);

66

68 Oid relnamespace,

69 Oid reltablespace,

70 Oid relid,

71 Oid reltypeid,

72 Oid reloftypeid,

73 Oid ownerid,

74 Oid accessmtd,

76 List *cooked_constraints,

77 char relkind,

78 char relpersistence,

79 bool shared_relation,

80 bool mapped_relation,

83 bool use_user_acl,

84 bool allow_system_table_mods,

85 bool is_internal,

86 Oid relrewrite,

88

90

92

94

96

98

101 Oid new_rel_oid,

104

107 Oid new_rel_oid,

109 Datum reloptions);

110

112 List *newColDefaults,

113 List *newConstraints,

114 bool allow_merge,

115 bool is_local,

116 bool is_internal,

117 const char *queryString);

119 List *constraints,

120 List *old_notnulls);

121

123

125 Datum missingval);

127

129 Node *raw_default,

130 Oid atttypid,

133 char attgenerated);

134

139

142

144

146

148 int flags);

149

151 Oid atttypid, Oid attcollation,

152 List *containing_rowtypes,

153 int flags);

154

155

157 char strategy,

160 List *partexprs,

161 Oid *partopclass,

162 Oid *partcollation);

166

167#endif

TransactionId MultiXactId

void RemoveAttributeById(Oid relid, AttrNumber attnum)

void RelationClearMissing(Relation rel)

struct CookedConstraint CookedConstraint

void SetAttrMissing(Oid relid, char *attname, char *value)

List * heap_truncate_find_FKs(List *relationIds)

void DeleteSystemAttributeTuples(Oid relid)

void StorePartitionKey(Relation rel, char strategy, int16 partnatts, AttrNumber *partattrs, List *partexprs, Oid *partopclass, Oid *partcollation)

void DeleteRelationTuple(Oid relid)

void DeleteAttributeTuples(Oid relid)

void RemoveStatistics(Oid relid, AttrNumber attnum)

Oid heap_create_with_catalog(const char *relname, Oid relnamespace, Oid reltablespace, Oid relid, Oid reltypeid, Oid reloftypeid, Oid ownerid, Oid accessmtd, TupleDesc tupdesc, List *cooked_constraints, char relkind, char relpersistence, bool shared_relation, bool mapped_relation, OnCommitAction oncommit, Datum reloptions, bool use_user_acl, bool allow_system_table_mods, bool is_internal, Oid relrewrite, ObjectAddress *typaddress)

void heap_truncate(List *relids)

struct RawColumnDefault RawColumnDefault

void CheckAttributeType(const char *attname, Oid atttypid, Oid attcollation, List *containing_rowtypes, int flags)

const FormData_pg_attribute * SystemAttributeByName(const char *attname)

void CopyStatistics(Oid fromrelid, Oid torelid)

void heap_truncate_check_FKs(List *relations, bool tempTables)

void StorePartitionBound(Relation rel, Relation parent, PartitionBoundSpec *bound)

List * AddRelationNotNullConstraints(Relation rel, List *constraints, List *old_notnulls)

void heap_drop_with_catalog(Oid relid)

List * AddRelationNewConstraints(Relation rel, List *newColDefaults, List *newConstraints, bool allow_merge, bool is_local, bool is_internal, const char *queryString)

void InsertPgClassTuple(Relation pg_class_desc, Relation new_rel_desc, Oid new_rel_oid, Datum relacl, Datum reloptions)

void CheckAttributeNamesTypes(TupleDesc tupdesc, char relkind, int flags)

void InsertPgAttributeTuples(Relation pg_attribute_rel, TupleDesc tupdesc, Oid new_rel_oid, const FormExtraData_pg_attribute tupdesc_extra[], CatalogIndexState indstate)

Node * cookDefault(ParseState *pstate, Node *raw_default, Oid atttypid, int32 atttypmod, const char *attname, char attgenerated)

void heap_truncate_one_rel(Relation rel)

void RemovePartitionKeyByRelId(Oid relid)

const FormData_pg_attribute * SystemAttributeDefinition(AttrNumber attno)

void StoreAttrMissingVal(Relation rel, AttrNumber attnum, Datum missingval)

Relation heap_create(const char *relname, Oid relnamespace, Oid reltablespace, Oid relid, RelFileNumber relfilenumber, Oid accessmtd, TupleDesc tupDesc, char relkind, char relpersistence, bool shared_relation, bool mapped_relation, bool allow_system_table_mods, TransactionId *relfrozenxid, MultiXactId *relminmxid, bool create_storage)