From: | Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | James Coleman <jtc331(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: [PATCH] Fix division by zero (explain.c) |
Date: | 2020-05-09 09:48:59 |
Message-ID: | CAEudQAp+7qoS92-4V1vLChpdY3vEkLCbf+gye6P-4cirE-0z0A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Em sáb., 9 de mai. de 2020 às 01:45, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> escreveu:
> James Coleman <jtc331(at)gmail(dot)com> writes:
> > There are always full sort groups before any prefix groups can happen,
> > so we know (even though the tooling doesn't) that the 2nd test can
> > never contradict the first.
>
> So maybe an assertion enforcing that would be appropriate?
> Untested, but:
>
> - if (fullsortGroupInfo->groupCount == 0 &&
> - prefixsortGroupInfo->groupCount == 0)
> + if (fullsortGroupInfo->groupCount == 0)
> + {
> + Assert(prefixsortGroupInfo->groupCount ==
> 0);
> continue;
> + }
>
I agree, asserts always help.
regards,
Ranier Vilela
Attachment | Content-Type | Size |
---|---|---|
fix_division_by_zero_explain_v2.patch | application/octet-stream | 1.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Etsuro Fujita | 2020-05-09 11:35:04 | Re: PG 13 release notes, first draft |
Previous Message | Michael Paquier | 2020-05-09 08:57:01 | Re: Logical replication subscription owner |