forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit534d0ea
committed
Generalize plpgsql's heuristic for importing expanded objects.
If a R/W expanded-object pointer is passed as a function parameter,take ownership of the object, regardless of its type. Previouslythis happened only for expanded arrays, but that was a result ofsloppy thinking. (If the plpgsql function did not end by returningthe object, the result would be to leak the object until thesurrounding memory context is cleaned up. That's not awful,since non-expanded values have always been managed that way,but we can do better.)Per discussion with Michel Pelletier. There's a lot more to dohere to make plpgsql work efficiently with expanded objects thataren't arrays, but this is an easy first step.Discussion:https://postgr.es/m/CACxu=vJaKFNsYxooSnW1wEgsAO5u_v1XYBacfVJ14wgJV_PYeg@mail.gmail.com1 parent67bab53 commit534d0ea
1 file changed
+11
-10
lines changedLines changed: 11 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
532 | 532 |
| |
533 | 533 |
| |
534 | 534 |
| |
535 |
| - | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
536 | 544 |
| |
537 | 545 |
| |
538 | 546 |
| |
539 | 547 |
| |
540 | 548 |
| |
541 |
| - | |
542 |
| - | |
543 |
| - | |
544 |
| - | |
545 |
| - | |
546 |
| - | |
547 |
| - | |
548 | 549 |
| |
549 |
| - | |
| 550 | + | |
550 | 551 |
| |
551 | 552 |
| |
552 | 553 |
| |
| |||
561 | 562 |
| |
562 | 563 |
| |
563 | 564 |
| |
564 |
| - | |
| 565 | + | |
565 | 566 |
| |
566 | 567 |
| |
567 | 568 |
| |
|
0 commit comments
Comments
(0)