185{
186#ifndef HAVE_LIBPROTOBUF
187 elog(ERROR, "ST_AsMVT: Compiled without protobuf-c support");
188 PG_RETURN_NULL();
189#else
191 bytea *buf;
192 elog(DEBUG2, "%s called", __func__);
193 if (!AggCheckCallContext(fcinfo, NULL))
194 elog(ERROR, "%s called in non-aggregate context", __func__);
195
196 if (PG_ARGISNULL(0))
197 {
198 bytea *emptybuf = palloc(VARHDRSZ);
199 SET_VARSIZE(emptybuf, VARHDRSZ);
200 PG_RETURN_BYTEA_P(emptybuf);
201 }
202
205 PG_RETURN_BYTEA_P(buf);
206#endif
207}
bytea * mvt_agg_finalfn(mvt_agg_context *ctx)
Finalize aggregation.