arkhipov / temporal_tables

Temporal Tables PostgreSQL Extension
BSD 2-Clause "Simplified" License
927 stars 46 forks source link

Error with Postgresql 12 beta1 #47

Closed mbande closed 4 years ago

mbande commented 5 years ago

after make and make install, trying to create extension:

# create extension temporal_tables ;
psql: ERROR:  could not load library "/usr/lib/postgresql/12/lib/temporal_tables.so": /usr/lib/postgresql/12/lib/temporal_tables.so: undefined symbol: heap_openrv
ghost commented 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 @@

include "temporal_tables.h"

+#if PG_VERSION_NUM >= 120000 +#include "access/table.h" +#include "access/relation.h" +#endif +

if defined(_MSC_VER) && (_MSC_VER < 1800)

define nextafter(x, y) _nextafter(x, y)

endif

@@ -246,7 +251,7 @@ versioning(PG_FUNCTION_ARGS) period_attname, RelationGetRelationName(relation))));

@@ -759,8 +764,11 @@ deserialize_system_period(HeapTuple tuple, period_attname, RelationGetRelationName(relation))));

+#if PG_VERSION_NUM >= 120000