David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> Your idea of checking the old highest member plus the offset seems a
> more robust method, so I've adjusted the patch to use that.
I question the decision to make this change the set in-place.
Wouldn't it be cheaper and less surprise-prone to always make
a copy?
regards, tom lane