@@ -364,7 +364,6 @@ extern void create_plain_partial_paths(PlannerInfo *root,
364364
365365/*
366366 * ExecEvalExpr()
367- * NOTE: 'errmsg' specifies error string when ExecEvalExpr returns multiple values.
368367 */
369368#if PG_VERSION_NUM >= 100000
370369#define ExecEvalExprCompat (expr , econtext , isNull ) \
@@ -384,6 +383,33 @@ ExecEvalExprCompat(ExprState *expr, ExprContext *econtext, bool *isnull)
384383#endif
385384
386385
386+ /*
387+ * ExecCheck()
388+ */
389+ #if PG_VERSION_NUM < 100000
390+ static inline bool
391+ ExecCheck (ExprState * state , ExprContext * econtext )
392+ {
393+ Datum ret ;
394+ bool isnull ;
395+ MemoryContext old_mcxt ;
396+
397+ /* short-circuit (here and in ExecInitCheck) for empty restriction list */
398+ if (state == NULL )
399+ return true;
400+
401+ old_mcxt = MemoryContextSwitchTo (econtext -> ecxt_per_tuple_memory );
402+ ret = ExecEvalExprCompat (state , econtext , & isnull );
403+ MemoryContextSwitchTo (old_mcxt );
404+
405+ if (isnull )
406+ return true;
407+
408+ return DatumGetBool (ret );
409+ }
410+ #endif
411+
412+
387413/*
388414 * extract_actual_join_clauses()
389415 */
@@ -790,11 +816,15 @@ extern AttrNumber *convert_tuples_by_name_map(TupleDesc indesc,
790816 * heap_delete()
791817 */
792818#if PG_VERSION_NUM >= 110000
793- #define heap_delete_compat (relation , tid , cid , crosscheck , wait , hufd ) \
794- heap_delete((relation), (tid), (cid), (crosscheck), (wait), (hufd), false)
819+ #define heap_delete_compat (relation , tid , cid , crosscheck , \
820+ wait , hufd , changing_part ) \
821+ heap_delete((relation), (tid), (cid), (crosscheck), \
822+ (wait), (hufd), (changing_part))
795823#else
796- #define heap_delete_compat (relation , tid , cid , crosscheck , wait , hufd ) \
797- heap_delete((relation), (tid), (cid), (crosscheck), (wait), (hufd))
824+ #define heap_delete_compat (relation , tid , cid , crosscheck , \
825+ wait , hufd , changing_part ) \
826+ heap_delete((relation), (tid), (cid), (crosscheck), \
827+ (wait), (hufd))
798828#endif
799829
800830/*
0 commit comments