@@ -364,7 +364,6 @@ extern void create_plain_partial_paths(PlannerInfo *root,
364
364
365
365
/*
366
366
* ExecEvalExpr()
367
- * NOTE: 'errmsg' specifies error string when ExecEvalExpr returns multiple values.
368
367
*/
369
368
#if PG_VERSION_NUM >= 100000
370
369
#define ExecEvalExprCompat (expr , econtext , isNull ) \
@@ -384,6 +383,33 @@ ExecEvalExprCompat(ExprState *expr, ExprContext *econtext, bool *isnull)
384
383
#endif
385
384
386
385
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
+
387
413
/*
388
414
* extract_actual_join_clauses()
389
415
*/
@@ -790,11 +816,15 @@ extern AttrNumber *convert_tuples_by_name_map(TupleDesc indesc,
790
816
* heap_delete()
791
817
*/
792
818
#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))
795
823
#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))
798
828
#endif
799
829
800
830
/*
0 commit comments