228{
229#ifndef HAVE_LIBPROTOBUF
230 elog(ERROR, "Missing libprotobuf-c");
231 PG_RETURN_NULL();
232#else
233 MemoryContext aggcontext, oldcontext;
235 elog(DEBUG2, "%s called", __func__);
236 if (!AggCheckCallContext(fcinfo, &aggcontext))
237 elog(ERROR, "%s called in non-aggregate context", __func__);
238
239 oldcontext = MemoryContextSwitchTo(aggcontext);
241 MemoryContextSwitchTo(oldcontext);
242
243 PG_RETURN_POINTER(ctx);
244#endif
245}
mvt_agg_context * mvt_ctx_deserialize(const bytea *ba)