Re: [HACKERS] Compiler warning in costsize.c - Mailing list pgsql-hackers

From David Rowley
Subject Re: [HACKERS] Compiler warning in costsize.c
Date
Msg-id CAKJS1f9=JJZ-G_C_RM4ExTQZYyx812-ievc16PmyKBgZ+4Ka_A@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Compiler warning in costsize.c  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On 11 April 2017 at 12:53, Michael Paquier <michael.paquier@gmail.com> wrote:
> On Tue, Apr 11, 2017 at 4:02 AM, Robert Haas <robertmhaas@gmail.com> wrote:
>> On Mon, Apr 10, 2017 at 2:09 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> ilmari@ilmari.org (Dagfinn Ilmari Mannsåker) writes:
>>>> Why bother with the 'rte' variable at all if it's only used for the
>>>> Assert()ing the rtekind?
>>>
>>> That was proposed a few messages back.  I don't like it because it makes
>>> these functions look different from the other scan-cost-estimation
>>> functions, and we'd just have to undo the "optimization" if they ever
>>> grow a need to reference the rte for another purpose.
>>
>> I think that's sort of silly, though.  It's a trivial difference,
>> neither likely to confuse anyone nor difficult to undo.
>
> +1. I would just do that and call it a day. There is no point to do a
> mandatory list lookup as that's just for an assertion, and fixing this
> warning does not seem worth the addition of fancier facilities. If the
> function declarations were doubly-nested in the code, I would
> personally consider the use of a variable, but not here.

Any more thoughts on what is acceptable for fixing this? beta1 is
looming and it seems a bit messy to be shipping that with these
warnings, however harmless they are.


-- David Rowley                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table
Next
From: Masahiko Sawada
Date:
Subject: [HACKERS] Fix a typo in snapmgr.c