Re: pgsql: Fix behavior of ~> (cube, int) operator

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Teodor Sigaev <teodor(at)sigaev(dot)ru>, pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Fix behavior of ~> (cube, int) operator
Date: 2018-04-10 11:33:51
Message-ID: CAPpHfdvTakCmjcbAcsaSB0XZ=WCLHRTmA+F2N3P12OCOWZfjBQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Sun, Jan 21, 2018 at 11:20 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Teodor Sigaev <teodor(at)sigaev(dot)ru> writes:
> > Fix behavior of ~> (cube, int) operator
>
> This patch has caused Coverity to complain, correctly AFAICS, about
> dead code in cube_coord_llur in the back branches:
>
> 1628 /* Inverse value if needed */
> 1629 if (inverse)
> >>> CID 1463943: Control flow issues (DEADCODE)
> >>> Execution cannot reach this statement: "result = -result;".
> 1630 result = -result;
> 1631
> 1632 PG_RETURN_FLOAT8(result);
>
> Seems to be due to sloppy division of changes between f50c80dbb (which
> was not back-patched) and 563a053bd. Please fix.
>

Thank you for catching this. You diagnosis is right.
I propose to commit the attached patch to 10 and 9.6.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
cube_backpatch_fix.patch application/octet-stream 858 bytes

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Teodor Sigaev 2018-04-10 11:51:47 Re: pgsql: Fix behavior of ~> (cube, int) operator
Previous Message Michael Paquier 2018-04-10 09:03:39 Re: pgsql: Merge catalog/pg_foo_fn.h headers back into pg_foo.h headers.