- Notifications
You must be signed in to change notification settings - Fork5
Commitbde689f
committed
Make UtilityContainsQuery recurse until it finds a non-utility Query.
The callers of UtilityContainsQuery want it to return a non-utility Queryif it returns anything at all. However, since we made CREATE TABLEAS/SELECT INTO into a utility command instead of a variant of SELECT,a command like "EXPLAIN SELECT INTO" results in two nested utilitystatements. So what we need UtilityContainsQuery to do is drill downto the bottom non-utility Query.I had thought of this possibility in setrefs.c, and fixed it there bylooping around the UtilityContainsQuery call; but overlooked that the callsites in plancache.c have a similar issue. In those cases it'snotationally inconvenient to provide an external loop, so let's redefineUtilityContainsQuery as recursing down to a non-utility Query instead.Noted by Rushabh Lathia. This is a somewhat cleaned-up version of hisproposed patch.1 parentf786715 commitbde689f
2 files changed
+21
-7
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1937 | 1937 |
| |
1938 | 1938 |
| |
1939 | 1939 |
| |
1940 |
| - | |
| 1940 | + | |
1941 | 1941 |
| |
1942 | 1942 |
| |
1943 | 1943 |
| |
|
Lines changed: 20 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1351 | 1351 |
| |
1352 | 1352 |
| |
1353 | 1353 |
| |
1354 |
| - | |
| 1354 | + | |
1355 | 1355 |
| |
1356 | 1356 |
| |
1357 | 1357 |
| |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
1358 | 1362 |
| |
1359 | 1363 |
| |
1360 | 1364 |
| |
1361 | 1365 |
| |
| 1366 | + | |
| 1367 | + | |
1362 | 1368 |
| |
1363 | 1369 |
| |
1364 | 1370 |
| |
1365 |
| - | |
1366 |
| - | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
1367 | 1376 |
| |
1368 | 1377 |
| |
1369 | 1378 |
| |
1370 |
| - | |
1371 |
| - | |
1372 |
| - | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
1373 | 1387 |
| |
1374 | 1388 |
| |
1375 | 1389 |
| |
|
0 commit comments
Comments
(0)