PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ pgis_asmvt_finalfn()

Datum pgis_asmvt_finalfn ( PG_FUNCTION_ARGS  )

Definition at line 176 of file lwgeom_out_mvt.c.

177 {
178 #ifndef HAVE_LIBPROTOBUF
179  elog(ERROR, "Missing libprotobuf-c");
180  PG_RETURN_NULL();
181 #else
182  mvt_agg_context *ctx;
183  bytea *buf;
184  elog(DEBUG2, "%s called", __func__);
185  if (!AggCheckCallContext(fcinfo, NULL))
186  elog(ERROR, "%s called in non-aggregate context", __func__);
187 
188  if (PG_ARGISNULL(0))
189  {
190  bytea *emptybuf = palloc(VARHDRSZ);
191  SET_VARSIZE(emptybuf, VARHDRSZ);
192  PG_RETURN_BYTEA_P(emptybuf);
193  }
194 
195  ctx = (mvt_agg_context *) PG_GETARG_POINTER(0);
196  buf = mvt_agg_finalfn(ctx);
197  PG_RETURN_BYTEA_P(buf);
198 #endif
199 }
bytea * mvt_agg_finalfn(mvt_agg_context *ctx)
Finalize aggregation.
Definition: mvt.c:1581

References mvt_agg_finalfn().

Here is the call graph for this function: