Closed mbande closed 4 years ago
encounter the similar issues, it seems that some macros should be used and some macroes are renamed.
`diff --git a/versioning.c b/versioning.c index 5d03492..338bdf3 100644 --- a/versioning.c +++ b/versioning.c @@ -33,6 +33,11 @@
+#if PG_VERSION_NUM >= 120000 +#include "access/table.h" +#include "access/relation.h" +#endif +
@@ -246,7 +251,7 @@ versioning(PG_FUNCTION_ARGS) period_attname, RelationGetRelationName(relation))));
period_attr = tupdesc->attrs[period_attnum - 1];
period_attr = TupleDescAttr(tupdesc, period_attnum - 1);
/ Check that system period attribute is not dropped. / if (period_attr->attisdropped) @@ -499,7 +504,7 @@ fill_versioning_hash_entry(VersioningHashEntry hash_entry, int history_attnum; char attname;
attr = tupdesc->attrs[i];
attr = TupleDescAttr(tupdesc, i);
if (attr->attisdropped)
continue;
@@ -511,7 +516,7 @@ fill_versioning_hash_entry(VersioningHashEntry *hash_entry, if (history_attnum < 0) continue;
history_attr = history_tupdesc->attrs[history_attnum - 1];
history_attr = TupleDescAttr(history_tupdesc, history_attnum - 1);
check_attr_type(attr, history_attr, relation, history_relation);
@@ -759,8 +764,11 @@ deserialize_system_period(HeapTuple tuple, period_attname, RelationGetRelationName(relation))));
+#if PG_VERSION_NUM >= 120000
+#endif range_deserialize(typcache, system_period, lower, upper, &empty);
if (empty || !upper->infinite) @@ -877,7 +885,11 @@ static HeapTuple modify_tuple(Relation rel, HeapTuple tuple, int period_attnum, RangeType *range) { int colnum[1] = { period_attnum }; +#if PG_VERSION_NUM >= 120000
bool nulls[1] = { false }; return heap_modify_tuple_by_cols(tuple, RelationGetDescr(rel), 1, colnum, values, nulls);`
after
make
andmake install
, trying to create extension: