Re: ANY_VALUE aggregate

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: ANY_VALUE aggregate
Дата
Msg-id 464ece4e-fabb-ddac-60da-897493c4476d@enterprisedb.com
обсуждение исходный текст
Ответ на Re: ANY_VALUE aggregate  (Vik Fearing <vik@postgresfriends.org>)
Ответы Re: ANY_VALUE aggregate  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: ANY_VALUE aggregate  (Vik Fearing <vik@postgresfriends.org>)
Список pgsql-hackers
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.
>>
>> PFA an implementation of this aggregate.
> 
> Here is v2 of this patch.  I had forgotten to update sql_features.txt.

In your patch, the documentation says the definition is any_value("any") 
but the catalog definitions are any_value(anyelement).  Please sort that 
out.

Since the transition function is declared strict, null values don't need 
to be checked.  I think the whole function could be reduced to

Datum
any_value_trans(PG_FUNCTION_ARGS)
{
     PG_RETURN_DATUM(PG_GETARG_DATUM(0));
}




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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Add LZ4 compression in pg_dump
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: [DOCS] Stats views and functions not in order?