Support IndexElem in raw_expression_tree_walker().
authorTom Lane
Mon, 23 May 2016 23:23:36 +0000 (19:23 -0400)
committerTom Lane
Mon, 23 May 2016 23:23:36 +0000 (19:23 -0400)
Needed for cases in which INSERT ... ON CONFLICT appears inside a
recursive CTE item.  Per bug #14153 from Thomas Alton.

Patch by Peter Geoghegan, slightly adjusted by me

Report: <20160521232802[email protected]>

src/backend/nodes/nodeFuncs.c

index c517dfd9d69c6264ecdd0c4904b8b8337ccea099..ce4f3707e436d0aec219fff88000313434b43e1e 100644 (file)
@@ -3365,6 +3365,15 @@ raw_expression_tree_walker(Node *node,
                /* for now, constraints are ignored */
            }
            break;
+       case T_IndexElem:
+           {
+               IndexElem  *indelem = (IndexElem *) node;
+
+               if (walker(indelem->expr, context))
+                   return true;
+               /* collation and opclass names are deemed uninteresting */
+           }
+           break;
        case T_GroupingSet:
            return walker(((GroupingSet *) node)->content, context);
        case T_LockingClause: