Re: array_agg and array_accum (patch)

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: array_agg and array_accum (patch)
Дата
Msg-id 4905F0B6.4070505@gmx.net
обсуждение исходный текст
Ответ на Re: array_agg and array_accum (patch)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: array_agg and array_accum (patch)  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: array_agg and array_accum (patch)  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
Tom Lane wrote:
> A larger objection to Jeff's draft patch is that it doesn't implement
> the <sort specification list>.  I'm entirely happy about not doing that
> --- the current SQL committee's willingness to invent random new syntax
> and nonorthogonal behavior for every function they can think of will be
> the death of SQL yet --- but it's something that we at least need to
> document the workaround for.

How else will you tell an aggregate function whose result depends on the 
input order which order you want?  The only aggregates defined in the 
standard where this matters are array_agg, array_accum, and xmlagg, but 
it would also be useful in other cases such as a text concatenation 
aggregate function or an aggregate function to calculate the correlation 
(or whatever alternative metric we come up with).  Given that the 
standard does not provide for user-defined aggregates, I think the way 
it's specified is perfectly OK.

Without a way to control the order, how useful are these array 
aggregates really?


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ERRORDATA_STACK_SIZE exceeded (server crash)
Следующее
От: "Pavel Stehule"
Дата:
Сообщение: Re: WIP: default values for function parameters