On Wed, Dec 17, 2025 at 09:24:31AM +0000, Bertrand Drouvot wrote: > I'd vote for just changing the palloc() like proposed in v1.
It does not seem that bad if we treat the uint8 rule for actual bytes, but I'm going to leave that for others to comment for now. By the way, while checking again the whole, David has proposed something different for btree_utils_var.c still a bit incorrect: https://www.postgresql.org/message-id/[email protected] I had my eyes on it a couple of days ago and noticed the bytea vs GBT_VARKEY business, but discarded it to look at the rest first because there were a lot of patterns to look at. His solution used palloc_array(), with a "bytea *". Okay, that's actually the same as btree_utils_var.h tells that bytea and GBT_VARKEY are the same thing, but there is also a point in being consistent in the code with what the header wants. So I have reused the palloc_array() with GBT_VARKEY, meaning that the solution of 5cf03552fbb4 is a mix of what both of you have proposed, except that it's consistent with the declaration. -- Michael
signature.asc
Description: PGP signature
