PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ pgis_geometry_union_parallel_combinefn()

Datum pgis_geometry_union_parallel_combinefn ( PG_FUNCTION_ARGS  )

Definition at line 91 of file lwgeom_union.c.

92{
93 MemoryContext aggcontext, old;
94 UnionState *state1 = NULL;
95 UnionState *state2 = NULL;
96
97 if (!PG_ARGISNULL(0))
98 state1 = (UnionState*) PG_GETARG_POINTER(0);
99 if (!PG_ARGISNULL(1))
100 state2 = (UnionState*) PG_GETARG_POINTER(1);
101
102 GetAggContext(&aggcontext);
103
104 if (state1 && state2)
105 {
106 old = MemoryContextSwitchTo(aggcontext);
107 state_combine(state1, state2);
108 lwfree(state2);
109 MemoryContextSwitchTo(old);
110 }
111 else if (state2)
112 {
113 state1 = state2;
114 }
115
116 if (!state1)
117 PG_RETURN_NULL();
118 PG_RETURN_POINTER(state1);
119}
void lwfree(void *mem)
Definition lwutil.c:248
#define GetAggContext(aggcontext)
static void state_combine(UnionState *state1, UnionState *state2)

References GetAggContext, lwfree(), and state_combine().

Here is the call graph for this function: