- Notifications
You must be signed in to change notification settings - Fork5
Commitbbd6eb5
committed
Repair some issues with column aliases and RowExpr construction in the
presence of dropped columns. Document the already-presumed fact thateref aliases in relation RTEs are supposed to have entries for droppedcolumns; cause the user alias structs to have such entries too, so thatthere's always a one-to-one mapping to the underlying physical attnums.Adjust expandRTE() and related code to handle the case where a columnthat is part of a JOIN has been dropped. Generalize expandRTE()'s APIso that it can be used in a couple of places that formerly rolled theirown implementation of the same logic. Fix ruleutils.c to suppressdisplay of aliases for columns that were dropped since the rule was made.1 parent040450b commitbbd6eb5
File tree
16 files changed
+464
-356
lines changed- src
- backend
- catalog
- optimizer
- path
- prep
- util
- parser
- rewrite
- utils/adt
- include
- nodes
- parser
- rewrite
16 files changed
+464
-356
lines changedLines changed: 7 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
970 | 970 |
| |
971 | 971 |
| |
972 | 972 |
| |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
973 | 979 |
| |
974 | 980 |
| |
975 | 981 |
| |
976 |
| - | |
977 | 982 |
| |
978 | 983 |
| |
979 | 984 |
| |
|
Lines changed: 13 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
60 |
| - | |
61 |
| - | |
| 60 | + | |
| 61 | + | |
62 | 62 |
| |
63 |
| - | |
| 63 | + | |
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
| |||
376 | 376 |
| |
377 | 377 |
| |
378 | 378 |
| |
379 |
| - | |
| 379 | + | |
380 | 380 |
| |
381 | 381 |
| |
382 | 382 |
| |
| |||
780 | 780 |
| |
781 | 781 |
| |
782 | 782 |
| |
783 |
| - | |
| 783 | + | |
784 | 784 |
| |
785 | 785 |
| |
786 | 786 |
| |
787 | 787 |
| |
788 |
| - | |
| 788 | + | |
| 789 | + | |
789 | 790 |
| |
790 | 791 |
| |
791 | 792 |
| |
| |||
799 | 800 |
| |
800 | 801 |
| |
801 | 802 |
| |
802 |
| - | |
| 803 | + | |
803 | 804 |
| |
804 | 805 |
| |
805 | 806 |
| |
| |||
818 | 819 |
| |
819 | 820 |
| |
820 | 821 |
| |
821 |
| - | |
| 822 | + | |
822 | 823 |
| |
823 | 824 |
| |
824 | 825 |
| |
| |||
827 | 828 |
| |
828 | 829 |
| |
829 | 830 |
| |
830 |
| - | |
| 831 | + | |
831 | 832 |
| |
832 | 833 |
| |
833 | 834 |
| |
834 | 835 |
| |
835 | 836 |
| |
836 |
| - | |
837 |
| - | |
| 837 | + | |
| 838 | + | |
838 | 839 |
| |
839 | 840 |
| |
840 | 841 |
| |
|
Lines changed: 19 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
| 19 | + | |
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
| |||
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
49 |
| - | |
| 49 | + | |
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
| |||
243 | 243 |
| |
244 | 244 |
| |
245 | 245 |
| |
246 |
| - | |
| 246 | + | |
| 247 | + | |
247 | 248 |
| |
248 |
| - | |
| 249 | + | |
249 | 250 |
| |
250 | 251 |
| |
251 | 252 |
| |
252 |
| - | |
| 253 | + | |
| 254 | + | |
253 | 255 |
| |
254 | 256 |
| |
255 |
| - | |
| 257 | + | |
| 258 | + | |
256 | 259 |
| |
257 | 260 |
| |
258 | 261 |
| |
| |||
261 | 264 |
| |
262 | 265 |
| |
263 | 266 |
| |
264 |
| - | |
| 267 | + | |
| 268 | + | |
265 | 269 |
| |
266 | 270 |
| |
267 | 271 |
| |
| |||
477 | 481 |
| |
478 | 482 |
| |
479 | 483 |
| |
480 |
| - | |
| 484 | + | |
481 | 485 |
| |
482 | 486 |
| |
483 | 487 |
| |
| |||
491 | 495 |
| |
492 | 496 |
| |
493 | 497 |
| |
494 |
| - | |
| 498 | + | |
495 | 499 |
| |
496 |
| - | |
| 500 | + | |
| 501 | + | |
497 | 502 |
| |
498 | 503 |
| |
499 | 504 |
| |
500 | 505 |
| |
501 | 506 |
| |
502 |
| - | |
503 |
| - | |
| 507 | + | |
| 508 | + | |
504 | 509 |
| |
505 |
| - | |
| 510 | + | |
| 511 | + | |
506 | 512 |
| |
507 | 513 |
| |
508 | 514 |
| |
|
Lines changed: 9 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 |
| |
| |||
515 | 515 |
| |
516 | 516 |
| |
517 | 517 |
| |
| 518 | + | |
518 | 519 |
| |
519 | 520 |
| |
| 521 | + | |
520 | 522 |
| |
521 | 523 |
| |
522 | 524 |
| |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
523 | 531 |
| |
524 | 532 |
| |
525 | 533 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
655 | 655 |
| |
656 | 656 |
| |
657 | 657 |
| |
658 |
| - | |
659 |
| - | |
| 658 | + | |
| 659 | + | |
660 | 660 |
| |
661 | 661 |
| |
662 | 662 |
| |
| |||
667 | 667 |
| |
668 | 668 |
| |
669 | 669 |
| |
670 |
| - | |
671 |
| - | |
| 670 | + | |
| 671 | + | |
672 | 672 |
| |
673 | 673 |
| |
674 | 674 |
| |
|
Lines changed: 6 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
662 | 662 |
| |
663 | 663 |
| |
664 | 664 |
| |
665 |
| - | |
666 |
| - | |
667 |
| - | |
668 |
| - | |
669 |
| - | |
670 |
| - | |
671 |
| - | |
672 |
| - | |
673 |
| - | |
674 |
| - | |
675 |
| - | |
676 |
| - | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
677 | 668 |
| |
678 |
| - | |
679 |
| - | |
680 |
| - | |
681 |
| - | |
682 |
| - | |
683 |
| - | |
684 |
| - | |
685 |
| - | |
686 |
| - | |
687 |
| - | |
| 669 | + | |
| 670 | + | |
688 | 671 |
| |
689 | 672 |
| |
690 | 673 |
| |
|
0 commit comments
Comments
(0)