PostGIS  2.5.0dev-r@@SVN_REVISION@@

◆ pgis_asmvt_deserialfn()

Datum pgis_asmvt_deserialfn ( PG_FUNCTION_ARGS  )

Definition at line 173 of file lwgeom_out_mvt.c.

References mvt_ctx_deserialize(), PG_FUNCTION_INFO_V1(), and pgis_asmvt_combinefn().

Referenced by pgis_asmvt_serialfn().

174 {
175 #ifndef HAVE_LIBPROTOBUF
176  elog(ERROR, "Missing libprotobuf-c");
177  PG_RETURN_NULL();
178 #else
179  MemoryContext aggcontext, oldcontext;
180  mvt_agg_context *ctx;
181  elog(DEBUG2, "%s called", __func__);
182  if (!AggCheckCallContext(fcinfo, &aggcontext))
183  elog(ERROR, "%s called in non-aggregate context", __func__);
184 
185  oldcontext = MemoryContextSwitchTo(aggcontext);
186  ctx = mvt_ctx_deserialize(PG_GETARG_BYTEA_P(0));
187  MemoryContextSwitchTo(oldcontext);
188 
189  PG_RETURN_POINTER(ctx);
190 #endif
191 }
mvt_agg_context * mvt_ctx_deserialize(const bytea *ba)
Definition: mvt.c:948
Here is the call graph for this function:
Here is the caller graph for this function: