PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ pgis_asmvt_finalfn()

Datum pgis_asmvt_finalfn ( PG_FUNCTION_ARGS  )

Definition at line 121 of file lwgeom_out_mvt.c.

References mvt_agg_finalfn().

Referenced by pgis_asmvt_transfn().

122 {
123 #ifndef HAVE_LIBPROTOBUF
124  elog(ERROR, "Missing libprotobuf-c");
125  PG_RETURN_NULL();
126 #else
127  struct mvt_agg_context *ctx;
128  uint8_t *buf;
129  if (!AggCheckCallContext(fcinfo, NULL))
130  elog(ERROR, "pgis_asmvt_finalfn called in non-aggregate context");
131 
132  if (PG_ARGISNULL(0))
133  {
134  bytea *emptybuf = palloc(VARHDRSZ);
135  SET_VARSIZE(emptybuf, VARHDRSZ);
136  PG_RETURN_BYTEA_P(emptybuf);
137  }
138 
139  ctx = (struct mvt_agg_context *) PG_GETARG_POINTER(0);
140  buf = mvt_agg_finalfn(ctx);
141  PG_RETURN_BYTEA_P(buf);
142 #endif
143 }
uint8_t * mvt_agg_finalfn(struct mvt_agg_context *ctx)
Finalize aggregation.
Definition: mvt.c:942
unsigned char uint8_t
Definition: uthash.h:79
Here is the call graph for this function:
Here is the caller graph for this function: