Re: [patch] bit XOR aggregate functions

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Vik Fearing <vik(at)postgresfriends(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-06 20:06:26
Message-ID: CAKFQuwbPO55vGvYnN1s=rcaqp0ofHVhMqEoJ_w_W1625s5nbqA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Saturday, March 6, 2021, David Fetter <david(at)fetter(dot)org> wrote:

>
> > > SELECT BIT_XOR(b ORDER BY a, c)... /* works */
> > > SELECT BIT_XOR(b) OVER (ORDER BY a, c)... /* works */
> > > SELECT BIT_XOR(b) FROM... /* errors out */
> >
> >
> > Why would such an error be necessary, or even desirable?
>
> Because there is no way to ensure that the results remain consistent
> from one execution to the next without such a guarantee.
>

Numerous existing aggregate functions have this behavior. Making those
error isn’t an option. So is making this a special case something we want
to do (and also maybe make doing so the rule going forward)?

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Banck 2021-03-06 22:08:44 Re: [Doc Patch] Clarify that CREATEROLE roles can GRANT default roles
Previous Message David Fetter 2021-03-06 20:05:44 Re: [patch] bit XOR aggregate functions