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

Commit f2689e4

Browse files
committed
Remove prohibition against SubLinks in the WHERE clause of an EXISTS subquery
that we're considering pulling up. I hadn't wanted to think through whether that could work during the first pass at this stuff. However, on closer inspection it seems to be safe enough.
1 parent 19e34b6 commit f2689e4

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/backend/optimizer/plan/subselect.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/optimizer/plan/subselect.c,v 1.134 2008/08/17 01:20:00 tgl Exp $
10+
* $PostgreSQL: pgsql/src/backend/optimizer/plan/subselect.c,v 1.135 2008/08/17 02:19:19 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -969,14 +969,6 @@ convert_EXISTS_sublink_to_join(PlannerInfo *root, SubLink *sublink,
969969
if (contain_volatile_functions(whereClause))
970970
return false;
971971

972-
/*
973-
* Also disallow SubLinks within the WHERE clause. (XXX this could
974-
* probably be supported, but it would complicate the transformation
975-
* below, and it doesn't seem worth worrying about in a first pass.)
976-
*/
977-
if (contain_subplans(whereClause))
978-
return false;
979-
980972
/*
981973
* Prepare to pull up the sub-select into top range table.
982974
*

0 commit comments

Comments
 (0)