forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita1b8c41
committed
Make some small planner API cleanups.
Move a few very simple node-creation and node-type-testing functionsfrom the planner's clauses.c to nodes/makefuncs and nodes/nodeFuncs.There's nothing planner-specific about them, as evidenced by thenumber of other places that were using them.While at it, rename and_clause() etc to is_andclause() etc, to clarifythat they are node-type-testing functions not node-creation functions.And use "static inline" implementations for the shortest ones.Also, modify flatten_join_alias_vars() and some subsidiary functionsto take a Query not a PlannerInfo to define the join structure thatVars should be translated according to. They were only using the"parse" field of the PlannerInfo anyway, so this just requires removingone level of indirection. The advantage is that now parse_agg.c canuse flatten_join_alias_vars() without the horrid kluge of creating anincomplete PlannerInfo, which will allow that file to be decoupled fromrelation.h in a subsequent patch.Discussion:https://postgr.es/m/11460.1548706639@sss.pgh.pa.us1 parente77cfa5 commita1b8c41
File tree
30 files changed
+309
-345
lines changed- src
- backend
- commands
- executor
- nodes
- optimizer
- path
- plan
- prep
- util
- parser
- partitioning
- statistics
- utils/cache
- include
- nodes
- optimizer
- test/modules/test_predtest
30 files changed
+309
-345
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
| 25 | + | |
25 | 26 |
| |
26 | 27 |
| |
27 | 28 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
| 36 | + | |
36 | 37 |
| |
37 |
| - | |
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
| |||
888 | 888 |
| |
889 | 889 |
| |
890 | 890 |
| |
891 |
| - | |
| 891 | + | |
892 | 892 |
| |
893 | 893 |
| |
894 | 894 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
31 |
| - | |
| 31 | + | |
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
|
Lines changed: 135 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
598 | 598 |
| |
599 | 599 |
| |
600 | 600 |
| |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 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 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
601 | 736 |
| |
602 | 737 |
| |
603 | 738 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| 24 | + | |
24 | 25 |
| |
25 |
| - | |
| 26 | + | |
26 | 27 |
| |
27 | 28 |
| |
28 | 29 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| 18 | + | |
18 | 19 |
| |
19 | 20 |
| |
20 | 21 |
| |
| |||
688 | 689 |
| |
689 | 690 |
| |
690 | 691 |
| |
691 |
| - | |
| 692 | + | |
692 | 693 |
| |
693 | 694 |
| |
694 | 695 |
| |
| |||
697 | 698 |
| |
698 | 699 |
| |
699 | 700 |
| |
700 |
| - | |
| 701 | + | |
701 | 702 |
| |
702 | 703 |
| |
703 | 704 |
| |
| |||
706 | 707 |
| |
707 | 708 |
| |
708 | 709 |
| |
709 |
| - | |
| 710 | + | |
710 | 711 |
| |
711 | 712 |
| |
712 | 713 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
79 | 79 |
| |
80 | 80 |
| |
81 | 81 |
| |
| 82 | + | |
82 | 83 |
| |
83 | 84 |
| |
84 | 85 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1297 | 1297 |
| |
1298 | 1298 |
| |
1299 | 1299 |
| |
1300 |
| - | |
| 1300 | + | |
1301 | 1301 |
| |
1302 | 1302 |
| |
1303 | 1303 |
| |
| |||
3368 | 3368 |
| |
3369 | 3369 |
| |
3370 | 3370 |
| |
3371 |
| - | |
| 3371 | + | |
3372 | 3372 |
| |
3373 | 3373 |
| |
3374 | 3374 |
| |
| |||
3680 | 3680 |
| |
3681 | 3681 |
| |
3682 | 3682 |
| |
3683 |
| - | |
| 3683 | + | |
3684 | 3684 |
| |
3685 | 3685 |
| |
3686 | 3686 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| 18 | + | |
18 | 19 |
| |
19 | 20 |
| |
20 | 21 |
| |
| |||
1554 | 1555 |
| |
1555 | 1556 |
| |
1556 | 1557 |
| |
1557 |
| - | |
1558 |
| - | |
| 1558 | + | |
1559 | 1559 |
| |
1560 | 1560 |
| |
1561 | 1561 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
250 | 250 |
| |
251 | 251 |
| |
252 | 252 |
| |
253 |
| - | |
| 253 | + | |
254 | 254 |
| |
255 | 255 |
| |
256 | 256 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| 19 | + | |
19 | 20 |
| |
20 | 21 |
| |
21 | 22 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
849 | 849 |
| |
850 | 850 |
| |
851 | 851 |
| |
852 |
| - | |
| 852 | + | |
| 853 | + | |
853 | 854 |
| |
854 | 855 |
| |
855 | 856 |
| |
| |||
1054 | 1055 |
| |
1055 | 1056 |
| |
1056 | 1057 |
| |
1057 |
| - | |
| 1058 | + | |
1058 | 1059 |
| |
1059 | 1060 |
| |
1060 | 1061 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
739 | 739 |
| |
740 | 740 |
| |
741 | 741 |
| |
742 |
| - | |
| 742 | + | |
743 | 743 |
| |
744 | 744 |
| |
745 | 745 |
| |
| |||
1693 | 1693 |
| |
1694 | 1694 |
| |
1695 | 1695 |
| |
1696 |
| - | |
| 1696 | + | |
1697 | 1697 |
| |
1698 | 1698 |
| |
1699 | 1699 |
| |
| |||
1706 | 1706 |
| |
1707 | 1707 |
| |
1708 | 1708 |
| |
1709 |
| - | |
| 1709 | + | |
1710 | 1710 |
| |
1711 | 1711 |
| |
1712 | 1712 |
| |
1713 | 1713 |
| |
1714 | 1714 |
| |
1715 | 1715 |
| |
1716 | 1716 |
| |
1717 |
| - | |
| 1717 | + | |
1718 | 1718 |
| |
1719 | 1719 |
| |
1720 | 1720 |
| |
| |||
1727 | 1727 |
| |
1728 | 1728 |
| |
1729 | 1729 |
| |
1730 |
| - | |
| 1730 | + | |
1731 | 1731 |
| |
1732 | 1732 |
| |
1733 | 1733 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
497 | 497 |
| |
498 | 498 |
| |
499 | 499 |
| |
500 |
| - | |
| 500 | + | |
501 | 501 |
| |
502 | 502 |
| |
503 | 503 |
| |
| |||
564 | 564 |
| |
565 | 565 |
| |
566 | 566 |
| |
567 |
| - | |
| 567 | + | |
568 | 568 |
| |
569 | 569 |
| |
570 | 570 |
| |
| |||
968 | 968 |
| |
969 | 969 |
| |
970 | 970 |
| |
971 |
| - | |
| 971 | + | |
972 | 972 |
| |
973 | 973 |
| |
974 | 974 |
| |
| |||
3317 | 3317 |
| |
3318 | 3318 |
| |
3319 | 3319 |
| |
3320 |
| - | |
| 3320 | + | |
3321 | 3321 |
| |
3322 | 3322 |
| |
3323 | 3323 |
| |
3324 |
| - | |
| 3324 | + | |
3325 | 3325 |
| |
3326 | 3326 |
| |
3327 | 3327 |
| |
|
0 commit comments
Comments
(0)