PostGIS  3.0.0dev-r@@SVN_REVISION@@

◆ pgis_asmvt_combinefn()

Datum pgis_asmvt_combinefn ( PG_FUNCTION_ARGS  )

Definition at line 198 of file lwgeom_out_mvt.c.

References mvt_ctx_combine().

Referenced by pgis_asmvt_deserialfn().

199 {
200 #ifndef HAVE_LIBPROTOBUF
201  elog(ERROR, "Missing libprotobuf-c");
202  PG_RETURN_NULL();
203 #else
204  MemoryContext aggcontext, oldcontext;
205  mvt_agg_context *ctx, *ctx1, *ctx2;
206  elog(DEBUG2, "%s called", __func__);
207  if (!AggCheckCallContext(fcinfo, &aggcontext))
208  elog(ERROR, "%s called in non-aggregate context", __func__);
209 
210  ctx1 = (mvt_agg_context*)PG_GETARG_POINTER(0);
211  ctx2 = (mvt_agg_context*)PG_GETARG_POINTER(1);
212  oldcontext = MemoryContextSwitchTo(aggcontext);
213  ctx = mvt_ctx_combine(ctx1, ctx2);
214  MemoryContextSwitchTo(oldcontext);
215  PG_RETURN_POINTER(ctx);
216 #endif
217 }
mvt_agg_context * mvt_ctx_combine(mvt_agg_context *ctx1, mvt_agg_context *ctx2)
Definition: mvt.c:1264
Here is the call graph for this function:
Here is the caller graph for this function: