Piotr Stefaniak <postgres@piotr-stefaniak.me> writes:
> using sqlsmith and UBSan I have found these two division by zero errors:
Hmm, thanks. Seems there's a bit of a disagreement as to whether
path->rows is allowed to be zero or not. It normally isn't; but
we've created an exception that provably-empty relations have zero
rowcount, so now these places had better deal with the case.
regards, tom lane