PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ pgis_asmvt_serialfn()

Datum pgis_asmvt_serialfn ( PG_FUNCTION_ARGS  )

Definition at line 148 of file lwgeom_out_mvt.c.

149 {
150 #ifndef HAVE_LIBPROTOBUF
151  elog(ERROR, "Missing libprotobuf-c");
152  PG_RETURN_NULL();
153 #else
154  mvt_agg_context *ctx;
155  elog(DEBUG2, "%s called", __func__);
156  if (!AggCheckCallContext(fcinfo, NULL))
157  elog(ERROR, "%s called in non-aggregate context", __func__);
158 
159  if (PG_ARGISNULL(0))
160  {
161  bytea *emptybuf = palloc(VARHDRSZ);
162  SET_VARSIZE(emptybuf, VARHDRSZ);
163  PG_RETURN_BYTEA_P(emptybuf);
164  }
165 
166  ctx = (mvt_agg_context *) PG_GETARG_POINTER(0);
167  PG_RETURN_BYTEA_P(mvt_ctx_serialize(ctx));
168 #endif
169 }
bytea * mvt_ctx_serialize(mvt_agg_context *ctx)
Definition: mvt.c:1283

References mvt_ctx_serialize().

Here is the call graph for this function: