• Tom Lane's avatar
    Guard against zero vardata.rel->tuples in estimate_hash_bucketsize(). · d65b665d
    Tom Lane authored
    If the referenced rel was proven empty, we'd compute 0/0 here, which
    results in the function returning NaN.  That's a bit more serious
    than the other zero-divide case.  Still, it only seems to be possible
    in HEAD, so no back-patch.
    
    Per report from Piotr Stefaniak.  I looked through the rest of selfuncs.c
    and found no other likely trouble spots.
    d65b665d
selfuncs.c 219 KB