From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Vik Fearing <vik(at)postgresfriends(dot)org>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, David Fetter <david(at)fetter(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "bashtanov(at)imap(dot)cc" <bashtanov(at)imap(dot)cc>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [patch] bit XOR aggregate functions |
Date: | 2021-03-07 21:08:14 |
Message-ID: | CAApHDvp85=UrPtfR-O8L5VidYXv9Nfx65+b9Smr=AMDrRueGiA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, 7 Mar 2021 at 23:24, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
The mandatory ORDER BY clause should be necessary for operations when
the result depends on the order. You need an order for calculation of
median. And you don't need to know an order for average. More if the
result is one number and is not possible to do a visual check of
correctness (like median).
I really don't think so.
# create table f (f float not null);
# insert into f values(1e100),(-1e100),(1.5);
# select sum(f order by f) from f;
sum
-----
0
(1 row)
# select sum(f) from f;
sum
-----
1.5
(1 row)
Users are going to be pretty annoyed with us if we demanded that they
include an ORDER BY for that query. Especially so since our ORDER BY
aggregate implementation still has no planner support.
David
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2021-03-07 21:10:09 | Re: PoC/WIP: Extended statistics on expressions |
Previous Message | Joe Conway | 2021-03-07 19:36:21 | Re: "has_column_privilege()" issue with attnums and non-existent columns |