Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/sqlite_fdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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 */
Expand Down