| From: | Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | [PATCH] Fix division by zero (explain.c) |
| Date: | 2020-04-23 12:37:56 |
| Message-ID: | CAEudQAqxf+mbirkO7pAdL61Qw8U8cF_QnEaL101L0tbBUocoQg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 | Content-Type | Size |
|---|---|---|
| fix_division_by_zero_explain.patch | application/octet-stream | 1.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephen Frost | 2020-04-23 12:40:47 | Re: More efficient RI checks - take 2 |
| Previous Message | Robert Haas | 2020-04-23 12:09:22 | Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators |