177{
178#ifndef HAVE_LIBPROTOBUF
179 elog(ERROR, "Missing libprotobuf-c");
180 PG_RETURN_NULL();
181#else
183 bytea *buf;
184 elog(DEBUG2, "%s called", __func__);
185 if (!AggCheckCallContext(fcinfo, NULL))
186 elog(ERROR, "%s called in non-aggregate context", __func__);
187
188 if (PG_ARGISNULL(0))
189 {
190 bytea *emptybuf = palloc(VARHDRSZ);
191 SET_VARSIZE(emptybuf, VARHDRSZ);
192 PG_RETURN_BYTEA_P(emptybuf);
193 }
194
197 PG_RETURN_BYTEA_P(buf);
198#endif
199}
bytea * mvt_agg_finalfn(mvt_agg_context *ctx)
Finalize aggregation.