Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 801386a

Browse files
committed
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.
1 parent 3848d21 commit 801386a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/backend/optimizer/path/allpaths.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -2840,9 +2840,11 @@ targetIsInAllPartitionLists(TargetEntry *tle, Query *query)
28402840
*
28412841
* Conditions checked here:
28422842
*
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).
2843+
* 1. The qual must not contain any SubPlans (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). 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.
28462848
*
28472849
* 2. If unsafeVolatile is set, the qual must not contain any volatile
28482850
* functions.

0 commit comments

Comments
 (0)