Thanks for the improvements Nathan. The current iteration LGTM, just a single comment on `pg_abs_s64`
> +static inline uint64 > +pg_abs_s64(int64 a) > +{ > + if (unlikely(a == PG_INT64_MIN)) > + return (uint64) PG_INT64_MAX + 1; > + if (a < 0) > + return -a; > + return a; > +} Since we know that a does not equal PG_INT64_MIN, could we shorten the last three lines and do the following? static inline uint64 pg_abs_s64(int64 a) { if (unlikely(a == PG_INT64_MIN)) return (uint64) PG_INT64_MAX + 1; return i64_abs(a); } Thanks, Joseph Koshakow