Re: Seamless replacement to MySQL's GROUP_CONCAT function... - Mailing list pgsql-general

From immersive.excel@gmail.com
Subject Re: Seamless replacement to MySQL's GROUP_CONCAT function...
Date
Msg-id 52008C72.7040508@gmail.com
Whole thread Raw
In response to Re: Seamless replacement to MySQL's GROUP_CONCAT function...  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-general
You're saying as oppose to straight SQL? I don't think so; but I had
defined it as such just in case there was some functional benefit that I
might be unaware of...

========================
On 08/06/2013 01:26 AM, Alvaro Herrera wrote:
> Pavel Stehule escribió:
>
>> you code can be translated to
>>
>> CREATE OR REPLACE
>> FUNCTION GROUP_CONCAT_ATOM(field1 TEXT, field2 TEXT, delimiter TEXT)
>>          RETURNS TEXT AS $$
>> BEGIN
>>   RETURN COALESCE(field1||delimiter||field2, field2, field1);
>> END;
>> $$ LANGUAGE plpgsql;
> Actually you don't even need plpgsql for this, do you ..
>



pgsql-general by date:

Previous
From: "ascot.moss@gmail.com"
Date:
Subject: Re: pg_stat_replication became empty suddenly
Next
From: "immersive.excel@gmail.com"
Date:
Subject: Re: Seamless replacement to MySQL's GROUP_CONCAT function...