/* * "Standard" case to copy from a HeapTuple. This is actually now somewhat * deprecated, but not worth getting rid of in view of the number of callers. */ void tuplestore_puttuple(Tuplestorestate *state, HeapTuple tuple) { /* * Copy the tuple. (Must do this even in WRITEFILE case.) */ tuple = COPYTUP(state, tuple); tuplestore_puttuple_common(state, (void *) tuple); }
/* * "Standard" case to copy from a HeapTuple. This is actually now somewhat * deprecated, but not worth getting rid of in view of the number of callers. */ void tuplestore_puttuple(Tuplestorestate *state, HeapTuple tuple) { MemoryContext oldcxt = MemoryContextSwitchTo(state->context); /* * Copy the tuple. (Must do this even in WRITEFILE case.) */ tuple = COPYTUP(state, tuple); tuplestore_puttuple_common(state, (void *) tuple); MemoryContextSwitchTo(oldcxt); }
/* * "Standard" case to copy from a HeapTuple. This is actually now somewhat * deprecated, but not worth getting rid of in view of the number of callers. */ void tuplestore_puttuple(Tuplestorestate *state, HeapTuple tuple) { MemoryContext oldcxt = MemoryContextSwitchTo(state->context); /* * Copy the tuple. (Must do this even in WRITEFILE case. Note that * COPYTUP includes USEMEM, so we needn't do that here.) */ tuple = COPYTUP(state, tuple); tuplestore_puttuple_common(state, (void *) tuple); MemoryContextSwitchTo(oldcxt); }