Re: array_agg and array_accum (patch)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: array_agg and array_accum (patch)
Дата
Msg-id 3517.1226617920@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: array_agg and array_accum (patch)  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: array_agg and array_accum (patch)  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: array_agg and array_accum (patch)  ("Robert Haas" <robertmhaas@gmail.com>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Jeff Davis wrote:
>> Here's an updated patch for just array_accum() with some simple docs.

> I have committed a "best of Robert Haas and Jeff Davis" array_agg() 
> function with standard SQL semantics.  I believe this gives the best 
> consistency with other aggregate functions for the no-input-rows case. 
> If some other behavior is wanted, it is a coalesce() away, as the 
> documentation states.

The original reason for doing this work, I think, was to let us
deprecate contrib/intagg, or at least turn it into a thin wrapper
around core-provided functionality.  We now have the means to do that
for int_array_aggregate, but what about int_array_enum?

It seems that it would be an easy evening's work to implement unnest(),
at least in the simple formfunction unnest(anyarray) returns setof anyelement

without the WITH ORDINALITY syntax proposed by the SQL spec.  Then
we could eliminate intagg's C code altogether, and just write it
as a couple of wrapper functions.

Does anyone have an objection to doing that?
        regards, tom lane


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

Предыдущее
От: "Robert Haas"
Дата:
Сообщение: Re: Simple postgresql.conf wizard
Следующее
От: Benedek László
Дата:
Сообщение: Re: pg_dump roles support