diff options
Diffstat (limited to 'src/pl/plperl/plperl.c')
-rw-r--r-- | src/pl/plperl/plperl.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index b807fcc3c0e..c0bc6ff5fb4 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -1,7 +1,7 @@ /********************************************************************** * plperl.c - perl as a procedural language for PostgreSQL * - * $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.150.2.3 2009/11/29 21:02:22 tgl Exp $ + * $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.150.2.4 2009/12/29 17:41:09 heikki Exp $ * **********************************************************************/ @@ -1981,11 +1981,7 @@ plperl_return_next(SV *sv) tuple = plperl_build_tuple_result((HV *) SvRV(sv), current_call_data->attinmeta); - - /* Make sure to store the tuple in a long-lived memory context */ - MemoryContextSwitchTo(rsi->econtext->ecxt_per_query_memory); tuplestore_puttuple(current_call_data->tuple_store, tuple); - MemoryContextSwitchTo(old_cxt); } else { @@ -2015,14 +2011,12 @@ plperl_return_next(SV *sv) isNull = true; } - /* Make sure to store the tuple in a long-lived memory context */ - MemoryContextSwitchTo(rsi->econtext->ecxt_per_query_memory); tuplestore_putvalues(current_call_data->tuple_store, current_call_data->ret_tdesc, &ret, &isNull); - MemoryContextSwitchTo(old_cxt); } + MemoryContextSwitchTo(old_cxt); MemoryContextReset(current_call_data->tmp_cxt); } |