We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent3848d21 commit801386aCopy full SHA for 801386a
src/backend/optimizer/path/allpaths.c
@@ -2840,9 +2840,11 @@ targetIsInAllPartitionLists(TargetEntry *tle, Query *query)
2840
*
2841
* Conditions checked here:
2842
2843
- * 1. The qual must not contain any subselects (mainly because I'm not sure
2844
- * it will work correctly: sublinks will already have been transformed into
2845
- * subplans in the qual, but not in the subquery).
+ * 1. The qual must not contain any SubPlans (mainly because I'm not sure
+ * it will work correctly: SubLinks will already have been transformed into
+ * SubPlans in the qual, but not in the subquery). Note that SubLinks that
2846
+ * transform to initplans are safe, and will be accepted here because what
2847
+ * we'll see in the qual is just a Param referencing the initplan output.
2848
2849
* 2. If unsafeVolatile is set, the qual must not contain any volatile
2850
* functions.