- Notifications
You must be signed in to change notification settings - Fork28
Commitfe578cb
committed
Fix datumSerialize infrastructure to not crash on non-varlena data.
Commit1efc7e5 did a poor job of emulating existing logic for touchingDatums that might be expanded-object pointers. It didn't check for typlenbeing -1 first, which meant it could crash on fixed-length pass-by-refvalues, and probably on cstring values as well. It also didn't useDatumGetPointer before VARATT_IS_EXTERNAL_EXPANDED, which while currentlyharmless is not according to documentation nor prevailing style.I also think the lack of any explanation as to why datumSerialize makesthese particular nonobvious choices is pretty awful, so fix that.Per report from Jarred Ward. Back-patch to 9.6 where this code came in.Discussion:https://postgr.es/m/6F61E6D2-2F5E-4794-9479-A429BE1CEA4B@simple.com1 parent1924ef4 commitfe578cb
1 file changed
+13
-5
lines changedLines changed: 13 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
264 | 264 |
| |
265 | 265 |
| |
266 | 266 |
| |
267 |
| - | |
| 267 | + | |
| 268 | + | |
268 | 269 |
| |
269 |
| - | |
270 |
| - | |
271 |
| - | |
| 270 | + | |
| 271 | + | |
272 | 272 |
| |
273 | 273 |
| |
274 | 274 |
| |
| |||
282 | 282 |
| |
283 | 283 |
| |
284 | 284 |
| |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
285 | 292 |
| |
286 | 293 |
| |
287 | 294 |
| |
| |||
306 | 313 |
| |
307 | 314 |
| |
308 | 315 |
| |
309 |
| - | |
| 316 | + | |
| 317 | + | |
310 | 318 |
| |
311 | 319 |
| |
312 | 320 |
| |
|
0 commit comments
Comments
(0)