Re: Re: plpgsql, I have a solution, want to see if there is a cleaner/better one. Taking vertical list and comma separating it onto a row - Mailing list pgsql-general

From Henry Drexler
Subject Re: Re: plpgsql, I have a solution, want to see if there is a cleaner/better one. Taking vertical list and comma separating it onto a row
Date
Msg-id CAAtgU9QKy29ZzTuiZTjuK50QOZxVp-ATpzrw=+g7S3+qsj_zJw@mail.gmail.com
Whole thread Raw
In response to Re: plpgsql, I have a solution, want to see if there is a cleaner/better one. Taking vertical list and comma separating it onto a row  (Thomas Kellerer <spam_eater@gmx.net>)
Responses Re: Re: plpgsql, I have a solution, want to see if there is a cleaner/better one. Taking vertical list and comma separating it onto a row  ("David Johnston" <polobo@yahoo.com>)
List pgsql-general


On Thu, Nov 10, 2011 at 8:34 AM, Thomas Kellerer <spam_eater@gmx.net> wrote:


SELECT type,
      string_agg(color, ',') as organized_by_type
FROM clothes
GROUP BY type;



wow, yes that is cleaner.

Thank you for taking the time - obviously I need to read through the string functions again. 

pgsql-general by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: plpgsql, I have a solution, want to see if there is a cleaner/better one. Taking vertical list and comma separating it onto a row
Next
From: David Johnston
Date:
Subject: Re: plpgsql, I have a solution, want to see if there is a cleaner/better one. Taking vertical list and comma separating it onto a row