forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb4cc35f
committed
Tighten coding for non-composite case in plperl's return_next.
Coverity complained about this code's practice of using scalar variablesas single-element arrays. While that's really just nitpicking, it probablyis more readable to declare them as arrays, so let's do that. A moreimportant point is that the code was just blithely assuming that theresult tupledesc has exactly one column; if it doesn't, we'd likely geta crash of some sort in tuplestore_putvalues. Since the tupledesc ismanufactured outside of plperl, that seems like an uncomfortably longchain of assumptions. We can nail it down at little cost with a sanitycheck earlier in the function.1 parentd2a51e3 commitb4cc35f
1 file changed
+17
-11
lines changedLines changed: 17 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3247 | 3247 |
| |
3248 | 3248 |
| |
3249 | 3249 |
| |
3250 |
| - | |
| 3250 | + | |
| 3251 | + | |
3251 | 3252 |
| |
3252 | 3253 |
| |
3253 | 3254 |
| |
3254 | 3255 |
| |
| 3256 | + | |
3255 | 3257 |
| |
| 3258 | + | |
| 3259 | + | |
| 3260 | + | |
| 3261 | + | |
3256 | 3262 |
| |
3257 | 3263 |
| |
3258 | 3264 |
| |
| |||
3300 | 3306 |
| |
3301 | 3307 |
| |
3302 | 3308 |
| |
3303 |
| - | |
3304 |
| - | |
| 3309 | + | |
| 3310 | + | |
3305 | 3311 |
| |
3306 |
| - | |
3307 |
| - | |
3308 |
| - | |
3309 |
| - | |
3310 |
| - | |
3311 |
| - | |
3312 |
| - | |
| 3312 | + | |
| 3313 | + | |
| 3314 | + | |
| 3315 | + | |
| 3316 | + | |
| 3317 | + | |
| 3318 | + | |
3313 | 3319 |
| |
3314 | 3320 |
| |
3315 | 3321 |
| |
3316 |
| - | |
| 3322 | + | |
3317 | 3323 |
| |
3318 | 3324 |
| |
3319 | 3325 |
| |
|
0 commit comments
Comments
(0)