forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2c91590
committed
Really fix the ambiguity in REFRESH MATERIALIZED VIEW CONCURRENTLY.
Rather than trying to pick table aliases that won't conflict withany possible user-defined matview column name, adjust the queries'syntax so that the aliases are only used in places where they can't bemistaken for column names. Mostly this consists of writing "alias.*"not just "alias", which adds clarity for humans as well as machines.We do have the issue that "SELECT alias.*" acts differently from"SELECT alias", but we can use the same hack ruleutils.c uses forwhole-row variables in SELECT lists: write "alias.*::compositetype".We might as well revert to the original aliases after doing this;they're a bit easier to read.Like75d66d1, back-patch to all supported branches.Discussion:https://postgr.es/m/2488325.1628261320@sss.pgh.pa.us1 parent9b0d717 commit2c91590
File tree
3 files changed
+47
-24
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+47
-24
lines changedLines changed: 29 additions & 22 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
536 | 536 |
| |
537 | 537 |
| |
538 | 538 |
| |
| 539 | + | |
539 | 540 |
| |
540 |
| - | |
541 |
| - | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
542 | 545 |
| |
543 | 546 |
| |
544 | 547 |
| |
| |||
626 | 629 |
| |
627 | 630 |
| |
628 | 631 |
| |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
629 | 636 |
| |
630 | 637 |
| |
631 | 638 |
| |
632 |
| - | |
633 |
| - | |
634 |
| - | |
635 |
| - | |
636 |
| - | |
637 |
| - | |
638 |
| - | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
639 | 646 |
| |
640 | 647 |
| |
641 | 648 |
| |
| |||
662 | 669 |
| |
663 | 670 |
| |
664 | 671 |
| |
665 |
| - | |
666 |
| - | |
667 |
| - | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
668 | 675 |
| |
669 | 676 |
| |
670 | 677 |
| |
| |||
756 | 763 |
| |
757 | 764 |
| |
758 | 765 |
| |
759 |
| - | |
| 766 | + | |
760 | 767 |
| |
761 |
| - | |
| 768 | + | |
762 | 769 |
| |
763 | 770 |
| |
764 | 771 |
| |
| |||
786 | 793 |
| |
787 | 794 |
| |
788 | 795 |
| |
789 |
| - | |
790 |
| - | |
| 796 | + | |
| 797 | + | |
791 | 798 |
| |
792 | 799 |
| |
793 | 800 |
| |
| |||
813 | 820 |
| |
814 | 821 |
| |
815 | 822 |
| |
816 |
| - | |
817 |
| - | |
818 |
| - | |
819 |
| - | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
820 | 827 |
| |
821 | 828 |
| |
822 | 829 |
| |
823 | 830 |
| |
824 | 831 |
| |
825 | 832 |
| |
826 | 833 |
| |
827 |
| - | |
828 |
| - | |
| 834 | + | |
| 835 | + | |
829 | 836 |
| |
830 | 837 |
| |
831 | 838 |
| |
|
Lines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
551 | 551 |
| |
552 | 552 |
| |
553 | 553 |
| |
554 |
| - | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
555 | 563 |
| |
556 | 564 |
| |
557 | 565 |
| |
|
Lines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
211 | 211 |
| |
212 | 212 |
| |
213 | 213 |
| |
214 |
| - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
215 | 223 |
| |
216 | 224 |
| |
217 | 225 |
| |
|
0 commit comments
Comments
(0)