Re: Definitional issue: stddev_pop (and related) for 1 input

2020-06-13 Thread Tom Lane
Dean Rasheed 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-condi

Re: Definitional issue: stddev_pop (and related) for 1 input

2020-06-13 Thread Dean Rasheed
On Fri, 12 Jun 2020 at 20:53, Tom Lane wrote: > > I wrote: > > Before v12, stddev_pop() had the following behavior with just a > > single input value: > > ... > > As of v12, though, all three cases produce 0. I am not sure what > > to think about that with respect to an infinity input, but I'm >

Re: Definitional issue: stddev_pop (and related) for 1 input

2020-06-12 Thread Tom Lane
I wrote: > Before v12, stddev_pop() had the following behavior with just a > single input value: > ... > As of v12, though, all three cases produce 0. I am not sure what > to think about that with respect to an infinity input, but I'm > quite sure I don't like it for NaN input. While I'm still no