예제 #1
0
/*
 * Similar to tuplestore_puttuple(), but start from the values + nulls
 * array. This avoids requiring that the caller construct a HeapTuple,
 * saving a copy.
 */
void
tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc,
					 Datum *values, bool *isnull)
{
	MinimalTuple tuple;

	tuple = heap_form_minimal_tuple(tdesc, values, isnull);

	tuplestore_puttuple_common(state, (void *) tuple);
}
예제 #2
0
/*
 * Similar to tuplestore_puttuple(), but start from the values + nulls
 * array. This avoids requiring that the caller construct a HeapTuple,
 * saving a copy.
 */
void
tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc,
					 Datum *values, bool *isnull)
{
	MinimalTuple tuple;
	MemoryContext oldcxt = MemoryContextSwitchTo(state->context);

	tuple = heap_form_minimal_tuple(tdesc, values, isnull);

	tuplestore_puttuple_common(state, (void *) tuple);

	MemoryContextSwitchTo(oldcxt);
}