forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf7b4190
committed
Fix dumping of views that are just VALUES(...) but have column aliases.
The "simple" path for printing VALUES clauses doesn't work if we needto attach nondefault column aliases, because there's noplace to do thatin the minimal VALUES() syntax. So modify get_simple_values_rte() todetect nondefault aliases and treat that as a non-simple case. Thisfurther exposes that the "non-simple" path never actually worked;it didn't produce valid syntax. Fix that too. Per bug #12789 fromCurtis McEnroe, and analysis by Andrew Gierth.Back-patch to all supported branches. Before 9.3, this also requiresback-patching the part of commit092d7dethat created get_simple_values_rte() to begin with; inserting the extratest into the old factorization of that logic would've been too messy.1 parent25576be commitf7b4190
File tree
3 files changed
+144
-15
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+144
-15
lines changedLines changed: 75 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2878 | 2878 |
| |
2879 | 2879 |
| |
2880 | 2880 |
| |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
| 2889 | + | |
| 2890 | + | |
| 2891 | + | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
| 2897 | + | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + | |
| 2901 | + | |
| 2902 | + | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
| 2931 | + | |
| 2932 | + | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
| 2939 | + | |
| 2940 | + | |
2881 | 2941 |
| |
2882 | 2942 |
| |
2883 | 2943 |
| |
2884 | 2944 |
| |
2885 | 2945 |
| |
| 2946 | + | |
2886 | 2947 |
| |
2887 | 2948 |
| |
2888 | 2949 |
| |
| |||
2895 | 2956 |
| |
2896 | 2957 |
| |
2897 | 2958 |
| |
2898 |
| - | |
2899 |
| - | |
| 2959 | + | |
2900 | 2960 |
| |
2901 |
| - | |
| 2961 | + | |
| 2962 | + | |
2902 | 2963 |
| |
2903 |
| - | |
2904 |
| - | |
2905 |
| - | |
2906 |
| - | |
2907 |
| - | |
2908 |
| - | |
2909 |
| - | |
2910 |
| - | |
2911 |
| - | |
2912 |
| - | |
2913 |
| - | |
2914 |
| - | |
| 2964 | + | |
| 2965 | + | |
2915 | 2966 |
| |
2916 | 2967 |
| |
2917 | 2968 |
| |
| |||
6474 | 6525 |
| |
6475 | 6526 |
| |
6476 | 6527 |
| |
| 6528 | + | |
6477 | 6529 |
| |
| 6530 | + | |
6478 | 6531 |
| |
6479 | 6532 |
| |
6480 | 6533 |
| |
| |||
6514 | 6567 |
| |
6515 | 6568 |
| |
6516 | 6569 |
| |
| 6570 | + | |
| 6571 | + | |
| 6572 | + | |
| 6573 | + | |
| 6574 | + | |
| 6575 | + | |
| 6576 | + | |
6517 | 6577 |
| |
6518 | 6578 |
| |
6519 | 6579 |
| |
|
Lines changed: 51 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1590 | 1590 |
| |
1591 | 1591 |
| |
1592 | 1592 |
| |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + |
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
942 | 942 |
| |
943 | 943 |
| |
944 | 944 |
| |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + |
0 commit comments
Comments
(0)