forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9179a82
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 parent789d806 commit9179a82
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 | |
---|---|---|---|
| |||
537 | 537 |
| |
538 | 538 |
| |
539 | 539 |
| |
| 540 | + | |
540 | 541 |
| |
541 |
| - | |
542 |
| - | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
543 | 546 |
| |
544 | 547 |
| |
545 | 548 |
| |
| |||
627 | 630 |
| |
628 | 631 |
| |
629 | 632 |
| |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
630 | 637 |
| |
631 | 638 |
| |
632 | 639 |
| |
633 |
| - | |
634 |
| - | |
635 |
| - | |
636 |
| - | |
637 |
| - | |
638 |
| - | |
639 |
| - | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
640 | 647 |
| |
641 | 648 |
| |
642 | 649 |
| |
| |||
663 | 670 |
| |
664 | 671 |
| |
665 | 672 |
| |
666 |
| - | |
667 |
| - | |
668 |
| - | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
669 | 676 |
| |
670 | 677 |
| |
671 | 678 |
| |
| |||
757 | 764 |
| |
758 | 765 |
| |
759 | 766 |
| |
760 |
| - | |
| 767 | + | |
761 | 768 |
| |
762 |
| - | |
| 769 | + | |
763 | 770 |
| |
764 | 771 |
| |
765 | 772 |
| |
| |||
787 | 794 |
| |
788 | 795 |
| |
789 | 796 |
| |
790 |
| - | |
791 |
| - | |
| 797 | + | |
| 798 | + | |
792 | 799 |
| |
793 | 800 |
| |
794 | 801 |
| |
| |||
814 | 821 |
| |
815 | 822 |
| |
816 | 823 |
| |
817 |
| - | |
818 |
| - | |
819 |
| - | |
820 |
| - | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
821 | 828 |
| |
822 | 829 |
| |
823 | 830 |
| |
824 | 831 |
| |
825 | 832 |
| |
826 | 833 |
| |
827 | 834 |
| |
828 |
| - | |
829 |
| - | |
| 835 | + | |
| 836 | + | |
830 | 837 |
| |
831 | 838 |
| |
832 | 839 |
| |
|
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)