- Notifications
You must be signed in to change notification settings - Fork5
Commitea8e42f
committed
Fix failure to check whether a rowtype's component types are sortable.
The existence of a btree opclass accepting composite types caused us toassume that every composite type is sortable. This isn't true of course;we need to check if the column types are all sortable. There was logicfor this for the case of array comparison (ie, check that the elementtype is sortable), but we missed the point for rowtypes. Per Teodor'sreport of an ANALYZE failure for an unsortable composite type.Rather than just add some more ad-hoc logic for this, I moved knowledge ofthe issue into typcache.c. The typcache will now only report out array_eq,record_cmp, and friends as usable operators if the array or composite typewill work with those functions.Unfortunately we don't have enough info to do this for anonymous RECORDtypes; in that case, just assume it will work, and take the runtime failureas before if it doesn't.This patch might be a candidate for back-patching at some point, butgiven the lack of complaints from the field, I'd rather just test it inHEAD for now.Note: most of the places touched in this patch will need further workwhen we get around to supporting hashing of record types.1 parent3ece391 commitea8e42f
File tree
8 files changed
+348
-126
lines changed- src
- backend
- optimizer/plan
- parser
- utils/cache
- include
- catalog
- utils
- test/regress
- expected
- sql
8 files changed
+348
-126
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
891 | 891 |
| |
892 | 892 |
| |
893 | 893 |
| |
| 894 | + | |
894 | 895 |
| |
895 | 896 |
| |
896 | 897 |
| |
|
Lines changed: 0 additions & 36 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
211 | 211 |
| |
212 | 212 |
| |
213 | 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 | 214 |
| |
251 | 215 |
| |
252 | 216 |
| |
|
Lines changed: 29 additions & 32 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
| 36 | + | |
36 | 37 |
| |
37 | 38 |
| |
38 | 39 |
| |
| |||
1120 | 1121 |
| |
1121 | 1122 |
| |
1122 | 1123 |
| |
1123 |
| - | |
1124 |
| - | |
1125 |
| - | |
1126 |
| - | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
1127 | 1128 |
| |
1128 | 1129 |
| |
1129 | 1130 |
| |
1130 | 1131 |
| |
1131 |
| - | |
1132 | 1132 |
| |
| 1133 | + | |
| 1134 | + | |
1133 | 1135 |
| |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
1134 | 1142 |
| |
1135 | 1143 |
| |
1136 |
| - | |
1137 |
| - | |
1138 |
| - | |
1139 |
| - | |
1140 |
| - | |
1141 |
| - | |
1142 |
| - | |
1143 |
| - | |
1144 |
| - | |
1145 |
| - | |
1146 |
| - | |
1147 |
| - | |
1148 |
| - | |
1149 |
| - | |
1150 |
| - | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
1151 | 1153 |
| |
1152 | 1154 |
| |
1153 | 1155 |
| |
| |||
1178 | 1180 |
| |
1179 | 1181 |
| |
1180 | 1182 |
| |
1181 |
| - | |
1182 | 1183 |
| |
| 1184 | + | |
| 1185 | + | |
1183 | 1186 |
| |
| 1187 | + | |
| 1188 | + | |
1184 | 1189 |
| |
1185 | 1190 |
| |
1186 |
| - | |
1187 |
| - | |
1188 |
| - | |
1189 |
| - | |
1190 |
| - | |
1191 |
| - | |
1192 |
| - | |
1193 |
| - | |
1194 |
| - | |
1195 |
| - | |
1196 |
| - | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
1197 | 1194 |
| |
1198 | 1195 |
| |
1199 | 1196 |
| |
|
0 commit comments
Comments
(0)