From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Definitional issue: stddev_pop (and related) for 1 input
Date: Sat, 13 Jun 2020 11:56:00 -0400
Message-ID: <831663.1592063760@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEZATCWd_Z2RVpOQoMpRZBeAqx84yj0UXjtR6+ijdHPPBaz9mw@mail.gmail.com>
References: <353062.1591898766@sss.pgh.pa.us>
<780404.1591991618@sss.pgh.pa.us>
<CAEZATCWd_Z2RVpOQoMpRZBeAqx84yj0UXjtR6+ijdHPPBaz9mw@mail.gmail.com>
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> The patch looks reasonable, except I wonder if all compilers are smart
> enough to realise that totCount is always initialised.
I think they should be, since that if-block ends with a return;
the only way to get to the use of totCount is for both parts of the
first if-condition to be executed.
In any case, we do have an effective policy of ignoring
uninitialized-variable warnings from very old/stupid compilers.
locust and prairiedog, which I think use the same ancient gcc
version, emit a couple dozen such warnings. If they are the only
ones that complain about this new code, I'll not worry.
Thanks for looking at the patch!
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, dean.a.rasheed@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Definitional issue: stddev_pop (and related) for 1 input
In-Reply-To: <831663.1592063760@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox