@@ -65,7 +65,6 @@ static int comparetup_rumitem(const SortTuple *a, const SortTuple *b,
65
65
static void copytup_rum (RumTuplesortstate * state , SortTuple * stup , void * tup );
66
66
static void copytup_rumitem (RumTuplesortstate * state , SortTuple * stup , void * tup );
67
67
static void * rum_tuplesort_getrum_internal (RumTuplesortstate * state , bool forward , bool * should_free );
68
- static void rum_tuplesort_putrum_internal (RumTuplesortstate * state , void * item );
69
68
70
69
static int
71
70
compare_rum_itempointer (ItemPointerData p1 , ItemPointerData p2 )
@@ -370,33 +369,16 @@ rum_tuplesort_get_memorycontext(RumTuplesortstate * state)
370
369
return state -> sortcontext ;
371
370
}
372
371
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
-
390
372
void
391
- rum_tuplesort_putrum (RumTuplesortstate * state , RumSortItem * item )
373
+ rum_tuplesort_putrum (RumTuplesortstate * state , RumSortItem * item )
392
374
{
393
- rum_tuplesort_putrum_internal (state , item );
375
+ tuplesort_puttupleslot (state , ( TupleTableSlot * ) item );
394
376
}
395
377
396
378
void
397
- rum_tuplesort_putrumitem (RumTuplesortstate * state , RumScanItem * item )
379
+ rum_tuplesort_putrumitem (RumTuplesortstate * state , RumScanItem * item )
398
380
{
399
- rum_tuplesort_putrum_internal (state , item );
381
+ tuplesort_puttupleslot (state , ( TupleTableSlot * ) item );
400
382
}
401
383
402
384
void
0 commit comments