Re: Two division by 0 errors in optimizer/plan/planner.c and optimizer/path/costsize.c - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Two division by 0 errors in optimizer/plan/planner.c and optimizer/path/costsize.c
Date
Msg-id 9913.1459116520@sss.pgh.pa.us
Whole thread Raw
In response to Re: Two division by 0 errors in optimizer/plan/planner.c and optimizer/path/costsize.c  (Piotr Stefaniak <postgres@piotr-stefaniak.me>)
List pgsql-hackers
Piotr Stefaniak <postgres@piotr-stefaniak.me> writes:
> I'm not saying this is necessarily a bug since the whole function deals 
> with floats, but perhaps it's interesting to note that ndistinct can be 
> 0 in src/backend/utils/adt/selfuncs.c:estimate_hash_bucketsize:

I think it's basically cosmetic unless you've got a machine that traps
zero divide, but still that's good to fix.  Thanks for the report!
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pg_rewind just doesn't fsync *anything*?
Next
From: Tom Lane
Date:
Subject: Re: Two division by 0 errors in optimizer/plan/planner.c and optimizer/path/costsize.c