- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit8a3f745
committed
Do not access indclass through Form_pg_index
Normally, accessing variable-length members of catalog structures pastthe first one doesn't work at all. Here, it happened to work becauseindnatts was checked to be 1, and so the defined FormData_pg_indexlayout, using int2vector[1] and oidvector[1] for variable-lengtharrays, happened to match the actual memory layout. But it's a veryfragile assumption, and it's not in a performance-critical path, socode it properly using heap_getattr() instead.bug analysis by Tom Lane1 parenteb6af01 commit8a3f745
1 file changed
+16
-1
lines changedLines changed: 16 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3351 | 3351 |
| |
3352 | 3352 |
| |
3353 | 3353 |
| |
| 3354 | + | |
| 3355 | + | |
| 3356 | + | |
3354 | 3357 |
| |
3355 | 3358 |
| |
3356 | 3359 |
| |
3357 | 3360 |
| |
| 3361 | + | |
| 3362 | + | |
| 3363 | + | |
| 3364 | + | |
| 3365 | + | |
| 3366 | + | |
| 3367 | + | |
| 3368 | + | |
| 3369 | + | |
| 3370 | + | |
| 3371 | + | |
| 3372 | + | |
3358 | 3373 |
| |
3359 | 3374 |
| |
3360 | 3375 |
| |
3361 | 3376 |
| |
3362 |
| - | |
| 3377 | + | |
3363 | 3378 |
| |
3364 | 3379 |
| |
3365 | 3380 |
| |
|
0 commit comments
Comments
(0)