mirror of https://github.com/citusdata/citus.git
write_intermediate_results
parent
b73b0242bf
commit
35c433ff94
|
@ -16,6 +16,7 @@
|
||||||
#include "miscadmin.h"
|
#include "miscadmin.h"
|
||||||
#include "pgstat.h"
|
#include "pgstat.h"
|
||||||
|
|
||||||
|
#include "access/htup_details.h"
|
||||||
#include "catalog/pg_enum.h"
|
#include "catalog/pg_enum.h"
|
||||||
#include "commands/copy.h"
|
#include "commands/copy.h"
|
||||||
#include "distributed/commands/multi_copy.h"
|
#include "distributed/commands/multi_copy.h"
|
||||||
|
@ -124,7 +125,6 @@ write_intermediate_result_sfunc(PG_FUNCTION_ARGS)
|
||||||
if (state == NULL)
|
if (state == NULL)
|
||||||
{
|
{
|
||||||
MemoryContext agg_context;
|
MemoryContext agg_context;
|
||||||
MemoryContext old_context;
|
|
||||||
|
|
||||||
text *resultId = PG_GETARG_TEXT_P(1);
|
text *resultId = PG_GETARG_TEXT_P(1);
|
||||||
char *resultIdString = text_to_cstring(resultId);
|
char *resultIdString = text_to_cstring(resultId);
|
||||||
|
@ -134,7 +134,7 @@ write_intermediate_result_sfunc(PG_FUNCTION_ARGS)
|
||||||
elog(ERROR, "aggregate function called in non-aggregate context");
|
elog(ERROR, "aggregate function called in non-aggregate context");
|
||||||
}
|
}
|
||||||
|
|
||||||
old_context = MemoryContextSwitchTo(agg_context);
|
MemoryContext old_context = MemoryContextSwitchTo(agg_context);
|
||||||
state = palloc0(sizeof(WriteIntermediateResultsState));
|
state = palloc0(sizeof(WriteIntermediateResultsState));
|
||||||
|
|
||||||
Oid tupType = HeapTupleHeaderGetTypeId(rec);
|
Oid tupType = HeapTupleHeaderGetTypeId(rec);
|
||||||
|
|
Loading…
Reference in New Issue