PostGIS  2.5.0beta1dev-r@@SVN_REVISION@@

◆ pgis_asmvt_combinefn()

Datum pgis_asmvt_combinefn ( PG_FUNCTION_ARGS  )

Definition at line 194 of file lwgeom_out_mvt.c.

References mvt_ctx_combine().

Referenced by pgis_asmvt_deserialfn().

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