Re: Review: listagg aggregate

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Review: listagg aggregate
Дата
Msg-id 603c8f071001280801w1ea13203ucabb1b6fe97403fe@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Review: listagg aggregate  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Review: listagg aggregate  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On Thu, Jan 28, 2010 at 10:56 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Thu, Jan 28, 2010 at 9:01 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
>>> simplest could not be a best. There have to be only a const
>>> expression. But we have not possibility to check it in pg.
>
>> Well... that's an entirely arbitrary limitation.  I admit that it
>> doesn't seem likely that someone would want to have a variable
>> delimiter, but putting extra effort and code complexity into
>> preventing it seems pointless.
>
> Yeah.  The real issue here is that in some cases you'd like to have
> non-aggregated parameters to an aggregate, but SQL has no notation
> to express that.

Right.

> I think Pavel's underlying complaint is that if the delimiter
> argument isn't constant, then we're exposing an implementation
> dependency in terms of just which values get separated by which
> delimiters.  The most practical implementation seems to be that
> the first-call delimiter isn't actually used at all, and on
> subsequent calls the delimiter *precedes* the associated value,
> which is a bit surprising given the order in which one writes
> them.  Not sure if this is worth documenting though.  Those two
> or three people who actually try it will figure it out soon enough.

Yeah, I'm thoroughly unworried about it.

...Robert


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Review: listagg aggregate
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Review: listagg aggregate