forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4c49611

Richard Guo
Remove code setting wrap_non_vars to true for UNION ALL subqueries
In pull_up_simple_subquery and pull_up_constant_function, there iscode that sets wrap_non_vars to true when dealing with an appendrelmember. The goal is to wrap subquery outputs that are not simple Varsin PlaceHolderVars, ensuring that what we pull up doesn't get mergedinto a surrounding expression during later processing, which couldcause it to fail to match the expression actually available from theappendrel.However, this is unnecessary. When pulling up an appendrel childsubquery, the only part of the upper query that could reference theappendrel child yet is the translated_vars list of the associatedAppendRelInfo that we just made for this child. Furthermore, we donot want to force use of PHVs in the AppendRelInfo, as there is noouter join between. In fact, perform_pullup_replace_vars always setswrap_non_vars to false before performing pullup_replace_vars on theAppendRelInfo.This patch simply removes the code that sets wrap_non_vars to true forUNION ALL subqueries.Author: Richard Guo <guofenglinux@gmail.com>Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>Discussion:https://postgr.es/m/CAMbWs4-VXDEi1v+hZYLxpOv0riJxHsCkCH1f46tLnhonEAyGCQ@mail.gmail.com1 parentd3b2e5e commit4c49611
1 file changed
+8
-25
lines changedLines changed: 8 additions & 25 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1440 | 1440 |
| |
1441 | 1441 |
| |
1442 | 1442 |
| |
1443 |
| - | |
1444 |
| - | |
1445 |
| - | |
1446 |
| - | |
1447 |
| - | |
1448 |
| - | |
1449 |
| - | |
1450 |
| - | |
1451 |
| - | |
1452 |
| - | |
1453 | 1443 |
| |
1454 | 1444 |
| |
1455 |
| - | |
1456 |
| - | |
1457 |
| - | |
1458 |
| - | |
1459 |
| - | |
1460 |
| - | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
1461 | 1451 |
| |
1462 | 1452 |
| |
1463 | 1453 |
| |
| |||
2159 | 2149 |
| |
2160 | 2150 |
| |
2161 | 2151 |
| |
2162 |
| - | |
2163 |
| - | |
2164 |
| - | |
2165 |
| - | |
2166 |
| - | |
2167 |
| - | |
2168 |
| - | |
2169 |
| - | |
2170 | 2152 |
| |
2171 | 2153 |
| |
2172 |
| - | |
| 2154 | + | |
| 2155 | + | |
2173 | 2156 |
| |
2174 | 2157 |
| |
2175 | 2158 |
| |
|
0 commit comments
Comments
(0)