- Notifications
You must be signed in to change notification settings - Fork28
Commitac4a9d9
committed
Fix incorrect handling of polymorphic aggregates used as window functions.
The transfunction was told that its first argument and result wereof the window function output type, not the aggregate state type.This'd only matter if the transfunction consults get_fn_expr_argtype,which typically only polymorphic functions would do.Although we have several regression tests around polymorphic aggs,none of them detected this mistake --- in fact, they still didn'tfail when I injected the same mistake into nodeAgg.c. So add somemore tests covering both plain agg and window-function-agg cases.Per report from Sebastian Luque. Back-patch to 9.6 where the errorwas introduced (by sloppy refactoring in commit804163b, looks like).Report: <87int2qkat.fsf@gmail.com>1 parente55a946 commitac4a9d9
File tree
3 files changed
+78
-1
lines changed- src
- backend/executor
- test/regress
- expected
- sql
3 files changed
+78
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2218 | 2218 |
| |
2219 | 2219 |
| |
2220 | 2220 |
| |
2221 |
| - | |
| 2221 | + | |
2222 | 2222 |
| |
2223 | 2223 |
| |
2224 | 2224 |
| |
|
Lines changed: 55 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
635 | 635 |
| |
636 | 636 |
| |
637 | 637 |
| |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
638 | 693 |
| |
639 | 694 |
| |
640 | 695 |
| |
|
Lines changed: 22 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
443 | 443 |
| |
444 | 444 |
| |
445 | 445 |
| |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
446 | 468 |
| |
447 | 469 |
| |
448 | 470 |
| |
|
0 commit comments
Comments
(0)