forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc0977b4
committed
Fix error handling in PLy_spi_execute_fetch_result().
If an error is thrown out of the datatype I/O functions called by thisfunction, we need to do subtransaction cleanup, which the previous codingentirely failed to do. Fortunately, both existing callers of this functionalready have proper cleanup logic, so re-throwing the exception is enough.Also, postpone creation of the resultset tupdesc until after the I/Oconversions are complete, so that we won't leak memory in TopMemoryContextwhen such an error happens.1 parente8ceb47 commitc0977b4
1 file changed
+15
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | 409 | | |
420 | 410 | | |
421 | 411 | | |
| |||
424 | 414 | | |
425 | 415 | | |
426 | 416 | | |
427 | | - | |
| 417 | + | |
| 418 | + | |
428 | 419 | | |
429 | 420 | | |
430 | 421 | | |
431 | 422 | | |
432 | 423 | | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
433 | 436 | | |
434 | 437 | | |
435 | 438 | | |
436 | 439 | | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
443 | | - | |
| 443 | + | |
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
| |||
0 commit comments
Comments
(0)