Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru> writes:
> Next version of the patch.
> As I see, now we trying to use Cardinality type instead of double.
> So, I named casting routine as clamp_cardinality_to_long.
Pushed with a bit of rewriting of comments etc. I left out the
test case too, because (a) for me, it did not reveal any difference
between patched and unpatched code, and (b) even if it had, it was
far too expensive to put into the core regression tests.
regards, tom lane