#include "catalog/pg_type.h"
#include "funcapi.h"
+#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "nodes/multibitmapset.h"
#include "nodes/nodeFuncs.h"
pull_up_sublinks_jointree_recurse(PlannerInfo *root, Node *jtnode,
Relids *relids)
{
+ /* Since this function recurses, it could be driven to stack overflow. */
+ check_stack_depth();
+
if (jtnode == NULL)
{
*relids = NULL;
JoinExpr *lowest_nulling_outer_join,
AppendRelInfo *containing_appendrel)
{
+ /* Since this function recurses, it could be driven to stack overflow. */
+ check_stack_depth();
+ /* Also, since it's a bit expensive, let's check for query cancel. */
+ CHECK_FOR_INTERRUPTS();
+
Assert(jtnode != NULL);
if (IsA(jtnode, RangeTblRef))
{
static bool
is_simple_union_all_recurse(Node *setOp, Query *setOpQuery, List *colTypes)
{
+ /* Since this function recurses, it could be driven to stack overflow. */
+ check_stack_depth();
+
if (IsA(setOp, RangeTblRef))
{
RangeTblRef *rtr = (RangeTblRef *) setOp;