Skip site navigation (1) Skip section navigation (2)

Re: Review: listagg aggregate

From: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, "pgsql-hackers(at)postgresql(dot)org Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review: listagg aggregate
Date: 2010-01-28 17:08:41
Message-ID: e08cc0401001280908j5d7596fas3500d85161b78605@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
2010/1/29 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
> 2010/1/28 Robert Haas <robertmhaas(at)gmail(dot)com>:
>> On Thu, Jan 28, 2010 at 9:01 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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.
>
> It is only a few lines with zero complexity.
>
> The main issue of Takahiro proposal is  "unclean" behave.
>
> we can have a content
>
> c1    c2
> -----------
> c11, c12,
> c21, c22
>
> and result of string_agg(c1, c2)
>
> have to be ?? c11 c12 c21 or c11 c22 c21 ?? What if some content of c2
> will be NULL ?? I checked oracle. Oracle doesn't allow variable as
> delimiter. We can't check it. But we can fix first value and using it
> as constant.

What about get_fn_expr_arg_stable() to check if the argument is stable
during aggregate?

Regards,


-- 
Hitoshi Harada

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2010-01-28 17:09:08
Subject: Re: Streaming replication, and walsender during recovery
Previous:From: Andrew DunstanDate: 2010-01-28 17:02:49
Subject: Re: Add on_trusted_init and on_untrusted_init to plperl [PATCH]

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group