48 #if ! (defined HAVE_LIBPROTOBUF && defined HAVE_GEOBUF) 49 elog(ERROR,
"Missing libprotobuf-c >= version 1.1");
52 MemoryContext aggcontext;
55 if (!AggCheckCallContext(fcinfo, &aggcontext))
56 elog(ERROR,
"pgis_asmvt_transfn: called in non-aggregate context");
57 MemoryContextSwitchTo(aggcontext);
59 if (PG_ARGISNULL(0)) {
60 ctx = palloc(
sizeof(*ctx));
63 if (PG_NARGS() > 2 && !PG_ARGISNULL(2))
64 ctx->
geom_name = text_to_cstring(PG_GETARG_TEXT_P(2));
70 if (!type_is_rowtype(get_fn_expr_argtype(fcinfo->flinfo, 1)))
71 elog(ERROR,
"pgis_asgeobuf_transfn: parameter row cannot be other than a rowtype");
72 ctx->
row = PG_GETARG_HEAPTUPLEHEADER(1);
75 PG_RETURN_POINTER(ctx);
void geobuf_agg_transfn(struct geobuf_agg_context *ctx)
Aggregation step.
void geobuf_agg_init_context(struct geobuf_agg_context *ctx)
Initialize aggregation context.