forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0c83eb2
committed
Fix unexpected error messages for various flavors of ALTER TABLE
Some commands of ALTER TABLE could fail with the following error:ERROR: "tab" is of the wrong typeThis error is unexpected, as all the code paths leading toATWrongRelkindError() should use a supported set of relkinds to generatecorrect error messages. This commit closes the gap with such mistakes,by adding all the missing relkind combinations. Tests are added tocheck all the problems found. Note that some combinations are not used,but these are left around as it could have an impact on applicationsrelying on this code.2ed532e has done a much larger refactoring on HEAD to make such errormessages easier to manage in the long-term, so nothing is needed there.Author: Kyotaro HoriguchiReviewed-by: Peter Eisentraut, Ahsan Hadi, Michael PaquierDiscussion:https://postgr.es/m/20210216.181415.368926598204753659.horikyota.ntt@gmail.comBackpatch-through: 111 parentb4842a8 commit0c83eb2
File tree
5 files changed
+31
-0
lines changed- src
- backend/commands
- test/regress
- expected
- sql
5 files changed
+31
-0
lines changedLines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6029 | 6029 |
| |
6030 | 6030 |
| |
6031 | 6031 |
| |
| 6032 | + | |
| 6033 | + | |
| 6034 | + | |
| 6035 | + | |
| 6036 | + | |
| 6037 | + | |
6032 | 6038 |
| |
6033 | 6039 |
| |
6034 | 6040 |
| |
| |||
6041 | 6047 |
| |
6042 | 6048 |
| |
6043 | 6049 |
| |
| 6050 | + | |
| 6051 | + | |
| 6052 | + | |
6044 | 6053 |
| |
6045 | 6054 |
| |
6046 | 6055 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
120 | 120 |
| |
121 | 121 |
| |
122 | 122 |
| |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
123 | 128 |
| |
124 | 129 |
| |
125 | 130 |
| |
| |||
4111 | 4116 |
| |
4112 | 4117 |
| |
4113 | 4118 |
| |
| 4119 | + | |
| 4120 | + | |
| 4121 | + | |
| 4122 | + | |
| 4123 | + | |
4114 | 4124 |
| |
4115 | 4125 |
| |
4116 | 4126 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
880 | 880 |
| |
881 | 881 |
| |
882 | 882 |
| |
| 883 | + | |
| 884 | + | |
883 | 885 |
| |
884 | 886 |
| |
885 | 887 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
158 | 158 |
| |
159 | 159 |
| |
160 | 160 |
| |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
161 | 165 |
| |
162 | 166 |
| |
163 | 167 |
| |
| |||
2640 | 2644 |
| |
2641 | 2645 |
| |
2642 | 2646 |
| |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
2643 | 2652 |
| |
2644 | 2653 |
| |
2645 | 2654 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
408 | 408 |
| |
409 | 409 |
| |
410 | 410 |
| |
| 411 | + | |
411 | 412 |
| |
412 | 413 |
| |
413 | 414 |
| |
|
0 commit comments
Comments
(0)