forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb1cb32f
committed
Fix multiple assignments to a column of a domain type.
We allow INSERT and UPDATE commands to assign to the same column more thanonce, as long as the assignments are to subfields or elements rather thanthe whole column. However, this failed when the target column was a domainover array rather than plain array. Fix by teaching process_matched_tle()to look through CoerceToDomain nodes, and add relevant test cases.Also add a group of test cases exercising domains over array of composite.It's doubtless accidental that CREATE DOMAIN allows this case while notallowing straight domain over composite; but it does, so we'd better makesure we don't break it. (I could not find any documentation mentioningeither side of that, so no doc changes.)It's been like this for a long time, so back-patch to all supportedbranches.Discussion:https://postgr.es/m/4206.1499798337@sss.pgh.pa.us1 parent42171e2 commitb1cb32f
File tree
3 files changed
+185
-4
lines changed- src
- backend/rewrite
- test/regress
- expected
- sql
3 files changed
+185
-4
lines changedLines changed: 31 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
934 | 934 |
| |
935 | 935 |
| |
936 | 936 |
| |
| 937 | + | |
937 | 938 |
| |
938 | 939 |
| |
939 | 940 |
| |
| |||
970 | 971 |
| |
971 | 972 |
| |
972 | 973 |
| |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
973 | 982 |
| |
974 | 983 |
| |
975 | 984 |
| |
976 | 985 |
| |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
977 | 998 |
| |
978 | 999 |
| |
979 | 1000 |
| |
| |||
1042 | 1063 |
| |
1043 | 1064 |
| |
1044 | 1065 |
| |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
1045 | 1076 |
| |
1046 | 1077 |
| |
1047 | 1078 |
| |
|
Lines changed: 106 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
107 | 107 |
| |
108 | 108 |
| |
109 | 109 |
| |
| 110 | + | |
110 | 111 |
| |
111 | 112 |
| |
112 | 113 |
| |
| |||
115 | 116 |
| |
116 | 117 |
| |
117 | 118 |
| |
118 |
| - | |
| 119 | + | |
| 120 | + | |
119 | 121 |
| |
120 | 122 |
| |
121 | 123 |
| |
| |||
125 | 127 |
| |
126 | 128 |
| |
127 | 129 |
| |
128 |
| - | |
| 130 | + | |
| 131 | + | |
129 | 132 |
| |
130 | 133 |
| |
131 | 134 |
| |
| |||
135 | 138 |
| |
136 | 139 |
| |
137 | 140 |
| |
138 |
| - | |
| 141 | + | |
| 142 | + | |
139 | 143 |
| |
140 | 144 |
| |
141 | 145 |
| |
| |||
149 | 153 |
| |
150 | 154 |
| |
151 | 155 |
| |
| 156 | + | |
152 | 157 |
| |
153 | 158 |
| |
154 |
| - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
155 | 171 |
| |
156 | 172 |
| |
157 | 173 |
| |
| |||
182 | 198 |
| |
183 | 199 |
| |
184 | 200 |
| |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
185 | 287 |
| |
186 | 288 |
| |
187 | 289 |
| |
|
Lines changed: 48 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
85 | 85 |
| |
86 | 86 |
| |
87 | 87 |
| |
| 88 | + | |
88 | 89 |
| |
89 | 90 |
| |
90 | 91 |
| |
| |||
100 | 101 |
| |
101 | 102 |
| |
102 | 103 |
| |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
103 | 111 |
| |
104 | 112 |
| |
105 | 113 |
| |
| |||
111 | 119 |
| |
112 | 120 |
| |
113 | 121 |
| |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
114 | 162 |
| |
115 | 163 |
| |
116 | 164 |
| |
|
0 commit comments
Comments
(0)