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 4001.1459003293@sss.pgh.pa.us
Whole thread Raw
In response to Two division by 0 errors in optimizer/plan/planner.c and optimizer/path/costsize.c  (Piotr Stefaniak <postgres@piotr-stefaniak.me>)
Responses Re: Two division by 0 errors in optimizer/plan/planner.c and optimizer/path/costsize.c
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Alter or rename enum value
Next
From: Ashutosh Sharma
Date:
Subject: Re: Performance degradation in commit 6150a1b0