- Notifications
You must be signed in to change notification settings - Fork5
Commitad50934
committed
Fix alignment and toasting bugs in range types.
A range type whose element type has 'd' alignment must have 'd' alignmentitself, else there is no guarantee that the element value can be usedin-place. (Because range_deserialize uses att_align_pointer which forciblyaligns the given pointer, violations of this rule did not lead to SIGBUSbut rather to garbage data being extracted, as in one of the addedregression test cases.)Also, you can't put a toast pointer inside a range datum, since thereferenced value could disappear with the range datum still present.For consistency with the handling of arrays and records, I also forceddecompression of in-line-compressed bound values. It would work to storethem as-is, but our policy is to avoid situations that might result indouble compression.Add assorted regression tests for this, and bump catversion because offixes to built-in pg_type entries.Also some marginal cleanup of inconsistent/unnecessary error checks.1 parent4165d5b commitad50934
File tree
8 files changed
+215
-130
lines changed- src
- backend
- commands
- utils/adt
- include/catalog
- test/regress
- expected
- sql
8 files changed
+215
-130
lines changedLines changed: 22 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1167 | 1167 |
| |
1168 | 1168 |
| |
1169 | 1169 |
| |
1170 |
| - | |
1171 |
| - | |
1172 | 1170 |
| |
1173 | 1171 |
| |
1174 | 1172 |
| |
| |||
1178 | 1176 |
| |
1179 | 1177 |
| |
1180 | 1178 |
| |
1181 |
| - | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
1182 | 1183 |
| |
| 1184 | + | |
1183 | 1185 |
| |
1184 | 1186 |
| |
1185 | 1187 |
| |
| |||
1314 | 1316 |
| |
1315 | 1317 |
| |
1316 | 1318 |
| |
1317 |
| - | |
| 1319 | + | |
1318 | 1320 |
| |
1319 | 1321 |
| |
1320 | 1322 |
| |
1321 | 1323 |
| |
1322 |
| - | |
1323 |
| - | |
| 1324 | + | |
| 1325 | + | |
1324 | 1326 |
| |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
1325 | 1334 |
| |
1326 | 1335 |
| |
1327 | 1336 |
| |
| |||
1332 | 1341 |
| |
1333 | 1342 |
| |
1334 | 1343 |
| |
1335 |
| - | |
| 1344 | + | |
1336 | 1345 |
| |
1337 | 1346 |
| |
1338 | 1347 |
| |
| |||
1343 | 1352 |
| |
1344 | 1353 |
| |
1345 | 1354 |
| |
1346 |
| - | |
1347 |
| - | |
| 1355 | + | |
| 1356 | + | |
1348 | 1357 |
| |
1349 | 1358 |
| |
1350 | 1359 |
| |
1351 | 1360 |
| |
1352 | 1361 |
| |
1353 | 1362 |
| |
1354 |
| - | |
1355 |
| - | |
| 1363 | + | |
| 1364 | + | |
1356 | 1365 |
| |
1357 | 1366 |
| |
1358 | 1367 |
| |
| |||
1392 | 1401 |
| |
1393 | 1402 |
| |
1394 | 1403 |
| |
1395 |
| - | |
| 1404 | + | |
1396 | 1405 |
| |
1397 | 1406 |
| |
1398 | 1407 |
| |
| |||
1401 | 1410 |
| |
1402 | 1411 |
| |
1403 | 1412 |
| |
| 1413 | + | |
1404 | 1414 |
| |
1405 | 1415 |
| |
1406 | 1416 |
| |
|
0 commit comments
Comments
(0)