looks good to me. some minor questions: /* * Protect against overflows in timestamp_mi. XXX convert to * ereturn one day? */ if (!TIMESTAMP_NOT_FINITE(start) && !TIMESTAMP_NOT_FINITE(finish) && !pg_sub_s64_overflow(finish, start, &dummy))
i don't understand the comment "XXX convert to ereturn one day?". do we need to add unlikely for "pg_sub_s64_overflow", i saw most of pg_sub_s64_overflow have unlikely.