postgresql/src/include
Tom Lane c1f8fb9bfb Avoid leaking memory while evaluating arguments for a table function.
ExecMakeTableFunctionResult evaluated the arguments for a function-in-FROM
in the query-lifespan memory context.  This is insignificant in simple
cases where the function relation is scanned only once; but if the function
is in a sub-SELECT or is on the inside of a nested loop, any memory
consumed during argument evaluation can add up quickly.  (The potential for
trouble here had been foreseen long ago, per existing comments; but we'd
not previously seen a complaint from the field about it.)  To fix, create
an additional temporary context just for this purpose.

Per an example from MauMau.  Back-patch to all active branches.
2014-06-19 22:13:47 -04:00
..
access Wrap multixact/members correctly during extension, take 2 2014-06-09 15:17:23 -04:00
bootstrap Update copyrights for 2013 2013-01-01 17:15:01 -05:00
catalog Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
commands Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
common Don't #include utils/palloc.h in common/fe_memutils.h. 2014-04-26 14:14:30 -04:00
datatype Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
executor Avoid leaking memory while evaluating arguments for a table function. 2014-06-19 22:13:47 -04:00
foreign Improve updatability checking for views and foreign tables. 2013-06-12 17:53:33 -04:00
lib Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
libpq Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
mb Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
nodes Avoid leaking memory while evaluating arguments for a table function. 2014-06-19 22:13:47 -04:00
optimizer Compute correct em_nullable_relids in get_eclass_for_sort_expr(). 2013-11-15 16:46:21 -05:00
parser Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
port Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
portability Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
postmaster Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
regex Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
replication Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
rewrite Avoid getting more than AccessShareLock when deparsing a query. 2014-03-06 19:31:09 -05:00
snowball Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
storage Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
tcop Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
tsearch Predict integer overflow to avoid buffer overruns. 2014-02-17 09:33:32 -05:00
utils Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
fmgr.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
funcapi.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
getaddrinfo.h Fix assorted issues in client host name lookup. 2014-04-02 17:11:27 -04:00
getopt_long.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Makefile Install headers from the new src/include/common subdirectory. 2013-02-26 15:27:30 -05:00
miscadmin.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_config.h.in Add mkdtemp() to libpgport. 2014-06-14 09:41:17 -04:00
pg_config.h.win32 Add mkdtemp() to libpgport. 2014-06-14 09:41:17 -04:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pg_trace.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pgstat.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
pgtar.h Move tar function headers to pgtar.h 2013-01-02 20:34:08 +01:00
pgtime.h Fix some odd behaviors when using a SQL-style simple GMT offset timezone. 2013-11-01 12:13:23 -04:00
port.h Add mkdtemp() to libpgport. 2014-06-14 09:41:17 -04:00
postgres.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
postgres_ext.h Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
postgres_fe.h Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
rusagestub.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
windowapi.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00