Commit d5e6891
committed
Fix new assertion for MERGE view_name ... DO NOTHING.
Such queries don't expand automatically updatable views, and ModifyTable
uses the wholerow attribute unconditionally. The user-visible behavior
is fine, so change to more-specific assertions. Commit
d5f788b added the wrong assertion.
Back-patch to v17, where commit 5f2e179
introduced MERGE view_name.
Reported by Alexander Lakhin.
Discussion: https://postgr.es/m/e4b40a88-c134-6926-3196-bc4501cb87a2@gmail.com1 parent 7102070 commit d5e6891Copy full SHA for d5e6891
File tree
Expand file treeCollapse file tree
3 files changed
+33
-17
lines changedOpen diff view settings
Filter options
- src
- backend/executor
- test/regress
- expected
- sql
Expand file treeCollapse file tree
3 files changed
+33
-17
lines changedOpen diff view settings
Collapse file
src/backend/executor/nodeModifyTable.c
Copy file name to clipboardExpand all lines: src/backend/executor/nodeModifyTable.c+23-17Lines changed: 23 additions & 17 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
24 | 24 | |
25 | 25 | |
26 | 26 | |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
33 | 34 | |
34 | 35 | |
35 | 36 | |
| ||
2726 | 2727 | |
2727 | 2728 | |
2728 | 2729 | |
2729 | | - |
2730 | | - |
2731 | | - |
2732 | | - |
| 2730 | + |
| 2731 | + |
| 2732 | + |
| 2733 | + |
2733 | 2734 | |
2734 | 2735 | |
2735 | 2736 | |
| ||
2820 | 2821 | |
2821 | 2822 | |
2822 | 2823 | |
2823 | | - |
2824 | | - |
| 2824 | + |
| 2825 | + |
2825 | 2826 | |
2826 | 2827 | |
2827 | 2828 | |
| ||
2887 | 2888 | |
2888 | 2889 | |
2889 | 2890 | |
2890 | | - |
2891 | | - |
2892 | 2891 | |
2893 | 2892 | |
2894 | | - |
2895 | 2893 | |
2896 | 2894 | |
2897 | 2895 | |
| ||
2983 | 2981 | |
2984 | 2982 | |
2985 | 2983 | |
| 2984 | + |
| 2985 | + |
| 2986 | + |
2986 | 2987 | |
2987 | 2988 | |
2988 | 2989 | |
| ||
3031 | 3032 | |
3032 | 3033 | |
3033 | 3034 | |
| 3035 | + |
| 3036 | + |
| 3037 | + |
| 3038 | + |
3034 | 3039 | |
3035 | 3040 | |
| 3041 | + |
3036 | 3042 | |
3037 | 3043 | |
3038 | 3044 | |
| ||
4004 | 4010 | |
4005 | 4011 | |
4006 | 4012 | |
4007 | | - |
4008 | | - |
| 4013 | + |
| 4014 | + |
4009 | 4015 | |
4010 | 4016 | |
4011 | 4017 | |
|
Collapse file
src/test/regress/expected/updatable_views.out
Copy file name to clipboardExpand all lines: src/test/regress/expected/updatable_views.out+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
199 | 199 | |
200 | 200 | |
201 | 201 | |
| 202 | + |
| 203 | + |
| 204 | + |
202 | 205 | |
203 | 206 | |
204 | 207 | |
| ||
375 | 378 | |
376 | 379 | |
377 | 380 | |
| 381 | + |
| 382 | + |
378 | 383 | |
379 | 384 | |
380 | 385 | |
|
Collapse file
src/test/regress/sql/updatable_views.sql
Copy file name to clipboardExpand all lines: src/test/regress/sql/updatable_views.sql+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
68 | 68 | |
69 | 69 | |
70 | 70 | |
| 71 | + |
| 72 | + |
| 73 | + |
71 | 74 | |
72 | 75 | |
73 | 76 | |
| ||
121 | 124 | |
122 | 125 | |
123 | 126 | |
| 127 | + |
| 128 | + |
124 | 129 | |
125 | 130 | |
126 | 131 | |
|
0 commit comments