PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ pgis_asgeobuf_finalfn()

Datum pgis_asgeobuf_finalfn ( PG_FUNCTION_ARGS  )

Definition at line 83 of file lwgeom_out_geobuf.c.

References geobuf_agg_finalfn().

Referenced by pgis_asgeobuf_transfn().

84 {
85 #if ! (defined HAVE_LIBPROTOBUF && defined HAVE_GEOBUF)
86  elog(ERROR, "Missing libprotobuf-c >= version 1.1");
87  PG_RETURN_NULL();
88 #else
89  uint8_t *buf;
90  struct geobuf_agg_context *ctx;
91  if (!AggCheckCallContext(fcinfo, NULL))
92  elog(ERROR, "pgis_asmvt_finalfn called in non-aggregate context");
93 
94  if (PG_ARGISNULL(0))
95  PG_RETURN_NULL();
96 
97  ctx = (struct geobuf_agg_context *) PG_GETARG_POINTER(0);
98  buf = geobuf_agg_finalfn(ctx);
99  PG_RETURN_BYTEA_P(buf);
100 #endif
101 }
uint8_t * geobuf_agg_finalfn(struct geobuf_agg_context *ctx)
Finalize aggregation.
Definition: geobuf.c:606
unsigned char uint8_t
Definition: uthash.h:79
Here is the call graph for this function:
Here is the caller graph for this function: