Repair corner-case bug in array version of percentile_cont(). The code for advancing through the input rows overlooked the case that we might already be past the first row of the row pair now being considered, in case the previous percentile also fell between the same two input rows.
Report and patch by Andrew Gierth; logic rewritten a bit for clarity by me. Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/9ccae6360df4a8be845e28b0ab9042ab09e8c397 Modified Files -------------- src/backend/utils/adt/orderedsetaggs.c | 34 ++++++++++++++++++------------ src/test/regress/expected/aggregates.out | 8 +++---- src/test/regress/sql/aggregates.sql | 2 +- 3 files changed, 26 insertions(+), 18 deletions(-) -- Sent via pgsql-committers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
