Re: ANY_VALUE aggregate - Mailing list pgsql-hackers

From Vik Fearing
Subject Re: ANY_VALUE aggregate
Date
Msg-id 7e0b78af-c8db-4a09-7612-08d35f84fcf3@postgresfriends.org
Whole thread Raw
In response to Re: ANY_VALUE aggregate  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 1/18/23 16:55, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
>> On 05.12.22 21:18, Vik Fearing wrote:
>>> On 12/5/22 15:57, Vik Fearing wrote:
>>>> The SQL:2023 Standard defines a new aggregate named ANY_VALUE.  It
>>>> returns an implementation-dependent (i.e. non-deterministic) value
>>>> from the rows in its group.
> 
>> Since the transition function is declared strict, null values don't need
>> to be checked.
> 
> Hmm, but should it be strict?  That means that what it's returning
> is *not* "any value" but "any non-null value".  What does the draft
> spec have to say about that?

It falls into the same category as AVG() etc.  That is, nulls are 
removed before calculation.
-- 
Vik Fearing




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: ANY_VALUE aggregate
Next
From: Tom Lane
Date:
Subject: Re: Improve GetConfigOptionValues function