summaryrefslogtreecommitdiff
path: root/src/pl
diff options
context:
space:
mode:
authorJoe Conway2012-05-10 05:57:19 +0000
committerJoe Conway2012-05-10 05:57:19 +0000
commitb58bacdacbb15948cf24c786ebbb92213a2fe013 (patch)
tree054782dedee44dcef2319377c12c59ac13e9d562 /src/pl
parentfd71421b0187de0e2bf76ff66b4a9433bd96c4a0 (diff)
PL/pgSQL RETURN NEXT was leaking converted tuples, causing
out of memory when looping through large numbers of rows. Flag the converted tuples to be freed. Complaint and patch by Joe.
Diffstat (limited to 'src/pl')
-rw-r--r--src/pl/plpgsql/src/pl_exec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index a385b9a82a..95e74b38dc 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -2472,6 +2472,7 @@ exec_stmt_return_next(PLpgSQL_execstate *estate,
{
tuple = do_convert_tuple(tuple, tupmap);
free_conversion_map(tupmap);
+ free_tuple = true;
}
}
break;