Re: partition table and stddev() /variance() behaviour

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: partition table and stddev() /variance() behaviour
Дата
Msg-id CAKJS1f9wY4Np6W1U-0pAV4cwyZZEZpeXTSd=zdKEmQ7_CuLD=A@mail.gmail.com
обсуждение исходный текст
Ответ на partition table and stddev() /variance() behaviour  (Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>)
Ответы Re: partition table and stddev() /variance() behaviour  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 22 June 2018 at 00:18, Rajkumar Raghuwanshi
<rajkumar.raghuwanshi@enterprisedb.com> wrote:
> CREATE TABLE part (c1 INT,c2 INT) PARTITION BY RANGE (c1);
> CREATE TABLE part_p1 PARTITION OF part FOR VALUES FROM (1) TO (3);
> CREATE TABLE part_p2 PARTITION OF part FOR VALUES FROM (3) TO (5);
>
> INSERT INTO part VALUES (1,5),(2,15),(3,3),(4,17);
>
> postgres=# SET parallel_setup_cost=0;
> postgres=# SELECT COUNT(c1),STDDEV(c2),VARIANCE(c2) FROM part;
>  count | stddev | variance
> -------+--------+----------
>      4 |      0 |        0
> (1 row)

Well, that's quite surprising. It appears to be a bug in
numeric_poly_combine for machines without a working int128 type. The
parameters in accum_sum_copy are in the incorrect order.

The very minimal fix is attached, but I'll need to go look at where
the tests for this have gone.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: server crashed with TRAP: FailedAssertion("!(!parallel_aware || pathnode->path.parallel_safe)"
Следующее
От: Tom Lane
Дата:
Сообщение: Re: server crashed with TRAP: FailedAssertion("!(!parallel_aware || pathnode->path.parallel_safe)"