From 993a5c302f286a5abfc152186af441df196bc7cf Mon Sep 17 00:00:00 2001 From: smmathews-bw-boston Date: Tue, 10 Oct 2023 19:27:26 -0400 Subject: [PATCH] set the var size --- roaringbitmap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/roaringbitmap.c b/roaringbitmap.c index 9ce1901..18e046b 100644 --- a/roaringbitmap.c +++ b/roaringbitmap.c @@ -292,6 +292,7 @@ roaringbitmap_out(PG_FUNCTION_ARGS) { serializedbytes = (bytea *) palloc(VARHDRSZ + expectedsize); roaring_bitmap_portable_serialize(r1, VARDATA(serializedbytes)); roaring_bitmap_free(r1); + SET_VARSIZE(serializedbytes, VARHDRSZ + expectedsize); return DirectFunctionCall1(byteaout, PointerGetDatum(serializedbytes)); }