PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ pgis_asmvt_finalfn()

Datum pgis_asmvt_finalfn ( PG_FUNCTION_ARGS  )

Definition at line 122 of file lwgeom_out_mvt.c.

123 {
124 #ifndef HAVE_LIBPROTOBUF
125  elog(ERROR, "Missing libprotobuf-c");
126  PG_RETURN_NULL();
127 #else
128  mvt_agg_context *ctx;
129  bytea *buf;
130  elog(DEBUG2, "%s called", __func__);
131  if (!AggCheckCallContext(fcinfo, NULL))
132  elog(ERROR, "%s called in non-aggregate context", __func__);
133 
134  if (PG_ARGISNULL(0))
135  {
136  bytea *emptybuf = palloc(VARHDRSZ);
137  SET_VARSIZE(emptybuf, VARHDRSZ);
138  PG_RETURN_BYTEA_P(emptybuf);
139  }
140 
141  ctx = (mvt_agg_context *) PG_GETARG_POINTER(0);
142  buf = mvt_agg_finalfn(ctx);
143  PG_RETURN_BYTEA_P(buf);
144 #endif
145 }
bytea * mvt_agg_finalfn(mvt_agg_context *ctx)
Finalize aggregation.
Definition: mvt.c:1491

References mvt_agg_finalfn().

Here is the call graph for this function: