mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
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.
This commit is contained in:
parent
19e34b6239
commit
f2689e421d
@ -7,7 +7,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/optimizer/plan/subselect.c,v 1.134 2008/08/17 01:20:00 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/optimizer/plan/subselect.c,v 1.135 2008/08/17 02:19:19 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -969,14 +969,6 @@ convert_EXISTS_sublink_to_join(PlannerInfo *root, SubLink *sublink,
|
|||||||
if (contain_volatile_functions(whereClause))
|
if (contain_volatile_functions(whereClause))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/*
|
|
||||||
* Also disallow SubLinks within the WHERE clause. (XXX this could
|
|
||||||
* probably be supported, but it would complicate the transformation
|
|
||||||
* below, and it doesn't seem worth worrying about in a first pass.)
|
|
||||||
*/
|
|
||||||
if (contain_subplans(whereClause))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prepare to pull up the sub-select into top range table.
|
* Prepare to pull up the sub-select into top range table.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user