postgresql/src
Tom Lane e405151b25 Fix memory leaks in record_out() and record_send().
record_out() leaks memory: it fails to free the strings returned by the
per-column output functions, and also is careless about detoasted values.
This results in a query-lifespan memory leakage when returning composite
values to the client, because printtup() runs the output functions in the
query-lifespan memory context.  Fix it to handle these issues the same way
printtup() does.  Also fix a similar leakage in record_send().

(At some point we might want to try to run output functions in
shorter-lived memory contexts, so that we don't need a zero-leakage policy
for them.  But that would be a significantly more invasive patch, which
doesn't seem like material for back-patching.)

In passing, use appendStringInfoCharMacro instead of appendStringInfoChar
in the innermost data-copying loop of record_out, to try to shave a few
cycles from this function's runtime.

Per trouble report from Carlos Henrique Reimer.  Back-patch to all
supported versions.
2012-11-13 14:44:52 -05:00
..
backend Fix memory leaks in record_out() and record_send(). 2012-11-13 14:44:52 -05:00
bin Further tweaking of the readfile() function in pg_ctl. 2012-10-18 22:30:50 +03:00
include Fix handling of inherited check constraints in ALTER COLUMN TYPE. 2012-11-05 13:36:36 -05:00
interfaces Fix lo_import and lo_export to return useful error messages more often. 2012-10-08 21:52:58 -04:00
makefiles Fix PGXS support for building loadable modules on AIX. 2012-10-09 21:04:26 -04:00
pl Back-patch fix and test case for bug #7516. 2012-09-14 11:50:15 -04:00
port Stamp 8.4.14. 2012-09-19 17:55:55 -04:00
template Tweak configure to attempt to add -qnoansialias to CFLAGS whenever running 2009-02-11 20:02:40 +00:00
test Fix handling of inherited check constraints in ALTER COLUMN TYPE. 2012-11-05 13:36:36 -05:00
timezone Update time zone data files to tzdata release 2012f. 2012-09-19 10:45:50 -04:00
tools Backpatch "Use the preferred version of xsubpp." 2011-11-28 07:45:48 -05:00
tutorial Remove copyright mention of Andrew Yu, per author's permission. 2010-02-02 18:52:06 +00:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:08 +02:00
bcc32.mak Remove old-style win32 client-only visual c++ build infrastructure for everything except 2007-03-05 14:18:38 +00:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Add the possibility to specify an explicit validator function for foreign-data 2009-02-24 10:06:36 +00:00
Makefile.global.in Back-patch creation of tar.bz2 tarball during "make dist". 2011-07-03 16:40:28 -04:00
Makefile.shlib Fix assorted issues with build and install paths containing spaces. 2011-06-14 16:03:20 -04:00
nls-global.mk Do not msgmerge against /dev/null; merge against the pot file itself 2009-01-20 09:58:50 +00:00
win32.mak Update supported standalone VC++ version to 7.1+ only, and fix 2007-08-03 10:47:11 +00:00