add comment about recursiveOk handling in subquery_planner()
authorTomas Vondra <[email protected]>
Fri, 6 Jan 2017 21:14:23 +0000 (22:14 +0100)
committerTomas Vondra <[email protected]>
Fri, 6 Jan 2017 21:14:23 +0000 (22:14 +0100)
The variable is likely unnecessary, the code pattern is confusing.

src/backend/optimizer/plan/planner.c

index 759c2cb21aa570d59f05fdf78cb6f79c89f67642..8d1cf8104f322b6f9112c977878a7059ff341797 100644 (file)
@@ -904,6 +904,10 @@ subquery_planner(PlannerGlobal *glob, Query *parse,
                }
        }
 
+       /*
+        * XXX This is a bit strange. root->recursiveOk is set to true explicitly,
+        * and now we check it. Harmless, but confusing.
+        */
        if (root->recursiveOk)
                root->recursiveOk = recursiveOk;