From: Tom Lane <tgl@sss.pgh.pa.us>
To: jens.with@t-online.de
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14913: Test for aggregates fails
Date: Thu, 16 Nov 2017 18:32:49 -0500
Message-ID: <13086.1510875169@sss.pgh.pa.us> (raw)
In-Reply-To: <20171116224401.1466.68649@wrigleys.postgresql.org>
References: <20171116224401.1466.68649@wrigleys.postgresql.org>
jens.with@t-online.de writes:
> ***************
> *** 1575,1583 ****
> select percentile_disc(array[0,0.1,0.25,0.5,0.75,0.9,1]) within group
> (order by thousand)
> from tenk1;
> ! percentile_disc
> ! ----------------------------
> ! {0,99,249,499,749,899,999}
> (1 row)
> select percentile_cont(array[0,0.25,0.5,0.75,1]) within group (order by
> thousand)
> --- 1575,1583 ----
> select percentile_disc(array[0,0.1,0.25,0.5,0.75,0.9,1]) within group
> (order by thousand)
> from tenk1;
> ! percentile_disc
> ! -----------------------------
> ! {0,100,249,499,749,900,999}
> (1 row)
> select percentile_cont(array[0,0.25,0.5,0.75,1]) within group (order by
> thousand)
Odd. Given the lack of similar reports, it must be something rather
platform-specific. I'm afraid you're going to have to do some of your
own sleuthing. Just looking at the code, it seems like this might
be explainable as a roundoff-error problem, if somehow (double) 0.1
times 10000 gives a smidge more than 1000. But I wouldn't really
expect any modern platform to get that wrong. Unless maybe you're
using -ffast-math, or some other accuracy-sacrificing compiler option?
BTW, that test has been there since 9.4. Which earlier versions of PG
have you successfully tested on the same platform?
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, jens.with@t-online.de
Subject: Re: BUG #14913: Test for aggregates fails
In-Reply-To: <13086.1510875169@sss.pgh.pa.us>
References: <20171116224401.1466.68649@wrigleys.postgresql.org> <13086.1510875169@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