- Notifications
You must be signed in to change notification settings - Fork5
Commit4886dc9
committed
Fix set_subquery_pathlist() to copy the RTE's subquery before it gets mangled
by the planning process. This prevents the "failed to locate grouping columns"error recently reported by Dickson Guedes. That happens because planningreplaces SubLinks by SubPlans in the subquery's targetlist, and exprTypmod()is smarter about the former than the latter, causing the apparent type ofthe subquery's output columns to change. This seems to be a deficiency weshould fix in exprTypmod(), but that will be a much more invasive patchwith possible side-effects elsewhere, so I'll do that only in HEAD.Back-patch to 8.3. Arguably the lack of a copying step is broken/dangerousall the way back, but in the absence of known problems I'll refrain frommaking the older branches pay the extra cost. (The reason this particularsymptom didn't appear before is that exprTypmod() wasn't smart about SubLinkseither, until 8.3.)1 parent4283172 commit4886dc9
File tree
3 files changed
+31
-1
lines changed- src
- backend/optimizer/path
- test/regress
- expected
- sql
3 files changed
+31
-1
lines changedLines changed: 8 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
523 | 523 |
| |
524 | 524 |
| |
525 | 525 |
| |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
526 | 533 |
| |
527 | 534 |
| |
528 | 535 |
| |
|
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
465 | 465 |
| |
466 | 466 |
| |
467 | 467 |
| |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + |
Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
298 | 298 |
| |
299 | 299 |
| |
300 | 300 |
| |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + |
0 commit comments
Comments
(0)