aboutsummaryrefslogtreecommitdiff
path: root/src/include/executor/executor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/executor/executor.h')
-rw-r--r--src/include/executor/executor.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h
index 6545a802223..1d824eff361 100644
--- a/src/include/executor/executor.h
+++ b/src/include/executor/executor.h
@@ -17,6 +17,7 @@
#include "catalog/partition.h"
#include "executor/execdesc.h"
#include "nodes/parsenodes.h"
+#include "utils/memutils.h"
/*
@@ -381,6 +382,22 @@ ExecQual(ExprState *state, ExprContext *econtext)
}
#endif
+/*
+ * ExecQualAndReset() - evaluate qual with ExecQual() and reset expression
+ * context.
+ */
+#ifndef FRONTEND
+static inline bool
+ExecQualAndReset(ExprState *state, ExprContext *econtext)
+{
+ bool ret = ExecQual(state, econtext);
+
+ /* inline ResetExprContext, to avoid ordering issue in this file */
+ MemoryContextReset(econtext->ecxt_per_tuple_memory);
+ return ret;
+}
+#endif
+
extern bool ExecCheck(ExprState *state, ExprContext *context);
/*