[PATCH] Fix division by zero (explain.c) - Mailing list pgsql-hackers

From Ranier Vilela
Subject [PATCH] Fix division by zero (explain.c)
Date
Msg-id CAEudQAqxf+mbirkO7pAdL61Qw8U8cF_QnEaL101L0tbBUocoQg@mail.gmail.com
Whole thread Raw
Responses Re: [PATCH] Fix division by zero (explain.c)  (James Coleman <jtc331@gmail.com>)
List pgsql-hackers
Hi,

Per Coverity.

If has 0 full groups, "we don't need to do anything" and need goes to next.
Otherwise a integer division by zero, can raise.

comments extracted trom explain.c:
 /*
* Since we never have any prefix groups unless we've first sorted
* a full groups and transitioned modes (copying the tuples into a
* prefix group), we don't need to do anything if there were 0 full
* groups.
*/

regards,
Ranier Vilela
Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators
Next
From: Stephen Frost
Date:
Subject: Re: More efficient RI checks - take 2