aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/numeric.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-08-31 19:54:58 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-08-31 19:54:58 -0400
commit6f7c0ea32f808a7dad3ec07db7e5fdf6514d2af0 (patch)
treed1e23feb93612685de7d1b1f2845bdee2d820cbb /src/backend/utils/adt/numeric.c
parentd062245b5bd591edf6f78bab8d6b8bb3ff69c7a6 (diff)
downloadpostgresql-6f7c0ea32f808a7dad3ec07db7e5fdf6514d2af0.tar.gz
postgresql-6f7c0ea32f808a7dad3ec07db7e5fdf6514d2af0.zip
Improve memory management for PL/Perl functions.
Unlike PL/Tcl, PL/Perl at least made an attempt to clean up after itself when a function gets redefined. But it was still using TopMemoryContext for the fn_mcxt of argument/result I/O functions, resulting in the potential for memory leaks depending on what those functions did, and the retail alloc/free logic was pretty bulky as well. Fix things to use a per-function memory context like the other PLs now do. Tweak a couple of places where things were being done in a not-very-safe order (on the principle that a memory leak is better than leaving global state inconsistent after an error). Also make some minor cosmetic adjustments, mostly in field names, to make the code look similar to the way PL/Tcl does now wherever it's essentially the same logic. Michael Paquier and Tom Lane Discussion: <CAB7nPqSOyAsHC6jL24J1B+oK3p=yyNoFU0Vs_B6fd2kdd5g5WQ@mail.gmail.com>
Diffstat (limited to 'src/backend/utils/adt/numeric.c')
0 files changed, 0 insertions, 0 deletions