Re: Partial aggregates pushdown - Mailing list pgsql-hackers

From Jelte Fennema-Nio
Subject Re: Partial aggregates pushdown
Date
Msg-id CAGECzQTx5Ofe8zHXgQHn5cKwaydqHOK8qdWvDyyBPCTnEfvUvw@mail.gmail.com
Whole thread Raw
In response to Re: Partial aggregates pushdown  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Partial aggregates pushdown
List pgsql-hackers
On Tue, 20 Aug 2024 at 18:50, Bruce Momjian <bruce@momjian.us> wrote:
> Okay, so we can do MAX easily, and AVG if the count can be represented
> as the same data type as the sum?  Is that correct?  Our only problem is
> that something like AVG(interval) can't use an array because arrays have
> to have the same data type for all array elements, and an interval can't
> represent a count?

Close, but still not completely correct. AVG(bigint) can also not be
supported by patch 1, because the sum and the count for that both
stored using an int128. So we'd need an array of int128, and there's
currently no int128 SQL type.



pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs
Next
From: Robert Haas
Date:
Subject: Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs