Re: [HACKERS] 9.4rc bug in percentile_cont

2014-12-13 Thread Tom Lane
Andrew Gierth writes: > Just got a report on IRC of a bug in the array version of > percentile_cont; if two of the requested percentiles were between the > same pair of input rows, the result could be wrong or an error would > be generated. Oooh, good catch. > Proposed patch (against current mas

[HACKERS] 9.4rc bug in percentile_cont

2014-12-12 Thread Andrew Gierth
Just got a report on IRC of a bug in the array version of percentile_cont; if two of the requested percentiles were between the same pair of input rows, the result could be wrong or an error would be generated. e.g. select percentile_cont(array[0.4,0.6]) within group (order by gs) from generate