Search Postgresql Archives

Re: Seamless replacement to MySQL's GROUP_CONCAT function...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ..
>



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux