@@ -65,7 +65,6 @@ static intcomparetup_rumitem(const SortTuple *a, const SortTuple *b,
6565static void copytup_rum (RumTuplesortstate * state ,SortTuple * stup ,void * tup );
6666static void copytup_rumitem (RumTuplesortstate * state ,SortTuple * stup ,void * tup );
6767static void * rum_tuplesort_getrum_internal (RumTuplesortstate * state ,bool forward ,bool * should_free );
68- static void rum_tuplesort_putrum_internal (RumTuplesortstate * state ,void * item );
6968
7069static int
7170compare_rum_itempointer (ItemPointerData p1 ,ItemPointerData p2 )
@@ -370,33 +369,16 @@ rum_tuplesort_get_memorycontext(RumTuplesortstate * state)
370369return state -> sortcontext ;
371370}
372371
373- static void
374- rum_tuplesort_putrum_internal (RumTuplesortstate * state ,void * item )
375- {
376- MemoryContext oldcontext = MemoryContextSwitchTo (state -> sortcontext );
377- SortTuple stup ;
378-
379- /*
380- * Copy the given tuple into memory we control, and decrease availMem.
381- * Then call the common code.
382- */
383- COPYTUP (state ,& stup ,item );
384-
385- puttuple_common (state ,& stup );
386-
387- MemoryContextSwitchTo (oldcontext );
388- }
389-
390372void
391- rum_tuplesort_putrum (RumTuplesortstate * state ,RumSortItem * item )
373+ rum_tuplesort_putrum (RumTuplesortstate * state ,RumSortItem * item )
392374{
393- rum_tuplesort_putrum_internal (state ,item );
375+ tuplesort_puttupleslot (state , ( TupleTableSlot * ) item );
394376}
395377
396378void
397- rum_tuplesort_putrumitem (RumTuplesortstate * state ,RumScanItem * item )
379+ rum_tuplesort_putrumitem (RumTuplesortstate * state ,RumScanItem * item )
398380{
399- rum_tuplesort_putrum_internal (state ,item );
381+ tuplesort_puttupleslot (state , ( TupleTableSlot * ) item );
400382}
401383
402384void