aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-11-28 23:32:17 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2017-11-28 23:32:17 -0500
commit801386af62eac84c13feec5a643c120cf0ce33bd (patch)
tree42887d5cbdfea0b103cb9d300c42f896f88fa1ca /src
parent3848d21673e9dcb42d4bc1353043d7c7d6f550cd (diff)
downloadpostgresql-801386af62eac84c13feec5a643c120cf0ce33bd.tar.gz
postgresql-801386af62eac84c13feec5a643c120cf0ce33bd.zip
Clarify old comment about qual_is_pushdown_safe's handling of subplans.
This comment glossed over the difference between initplans and subplans, but they are indeed different for our purposes here.
Diffstat (limited to 'src')
-rw-r--r--src/backend/optimizer/path/allpaths.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index 906d08ab373..44f6b034420 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -2840,9 +2840,11 @@ targetIsInAllPartitionLists(TargetEntry *tle, Query *query)
*
* Conditions checked here:
*
- * 1. The qual must not contain any subselects (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).
+ * 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
+ * transform to initplans are safe, and will be accepted here because what
+ * we'll see in the qual is just a Param referencing the initplan output.
*
* 2. If unsafeVolatile is set, the qual must not contain any volatile
* functions.