Fix some grammatical errors in some comments
authorDavid Rowley <[email protected]>
Wed, 5 Jun 2024 09:31:28 +0000 (21:31 +1200)
committerDavid Rowley <[email protected]>
Wed, 5 Jun 2024 09:31:28 +0000 (21:31 +1200)
Introduced by 9f1337639.

Author: James Coleman <[email protected]>
Discussion: https://postgr.es/m/CAAaqYe9ZQ_1+QiF_Nv7b37opicBu+35ZQK1CetQ54r5UdrF1eg@mail.gmail.com

src/backend/optimizer/plan/subselect.c

index e35ebea8b433f4a36d43df153265f605cc5db9d8..6d003cc8e5cbef49da0c9fb579986045ac7677d5 100644 (file)
@@ -1271,15 +1271,15 @@ convert_ANY_sublink_to_join(PlannerInfo *root, SubLink *sublink,
    Assert(sublink->subLinkType == ANY_SUBLINK);
 
    /*
-    * If the sub-select refers to any Vars of the parent query, we so let's
-    * considering it as LATERAL.  (Vars of higher levels don't matter here.)
+    * If the sub-select contains any Vars of the parent query, we treat it as
+    * LATERAL.  (Vars from higher levels don't matter here.)
     */
    sub_ref_outer_relids = pull_varnos_of_level(NULL, (Node *) subselect, 1);
    use_lateral = !bms_is_empty(sub_ref_outer_relids);
 
    /*
-    * Check that sub-select refers nothing outside of available_rels of the
-    * parent query.
+    * Can't convert if the sub-select contains parent-level Vars of relations
+    * not in available_rels.
     */
    if (!bms_is_subset(sub_ref_outer_relids, available_rels))
        return NULL;