241{
242#ifndef HAVE_LIBPROTOBUF
243 elog(ERROR, "ST_AsMVT: Compiled without protobuf-c support");
244 PG_RETURN_NULL();
245#else
246 MemoryContext aggcontext, oldcontext;
248 elog(DEBUG2, "%s called", __func__);
249 if (!AggCheckCallContext(fcinfo, &aggcontext))
250 elog(ERROR, "%s called in non-aggregate context", __func__);
251
252 oldcontext = MemoryContextSwitchTo(aggcontext);
254 MemoryContextSwitchTo(oldcontext);
255
256 PG_RETURN_POINTER(ctx);
257#endif
258}
mvt_agg_context * mvt_ctx_deserialize(const bytea *ba)