From f9f32d736f72efc15c44af25ec2f1c205e90ae4a Mon Sep 17 00:00:00 2001 From: Laurenz Albe Date: Thu, 11 Oct 2018 21:59:42 +0200 Subject: [PATCH] Adapt to PostgreSQL commit 29c94e03c7d05d2b29afa1de32795ce178531246 This commit did away with ExecStoreTuple and introduced ExecStoreHeapTuple instead. --- src/sqlite_fdw.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/sqlite_fdw.c b/src/sqlite_fdw.c index a1eb505..7bef4f0 100755 --- a/src/sqlite_fdw.c +++ b/src/sqlite_fdw.c @@ -48,6 +48,12 @@ PG_MODULE_MAGIC; */ #define DEFAULT_ESTIMATED_LINES 1000000 +/* ExecStoreHeapTuples was introduced in PostgreSQL v12 */ +#if PG_VERSION_NUM < 120000 +#define ExecStoreHeapTuple(tuple, slot, shouldFree) \ + ExecStoreTuple((tuple), (slot), InvalidBuffer, (shouldFree)) +#endif + /* * SQL functions */ @@ -730,7 +736,7 @@ sqliteIterateForeignScan(ForeignScanState *node) } tuple = BuildTupleFromCStrings(TupleDescGetAttInMetadata(node->ss.ss_currentRelation->rd_att), values); - ExecStoreTuple(tuple, slot, InvalidBuffer, false); + ExecStoreHeapTuple(tuple, slot, false); } /* then return the slot */