Sorting CSV string and removing Duplicates - Mailing list pgsql-general

From Alex Magnum
Subject Sorting CSV string and removing Duplicates
Date
Msg-id CA+cR4zeD9tK+vYwVHBTY_fO0EN_-9dzcTsrRf=2XL6nmdpAKqQ@mail.gmail.com
Whole thread Raw
Responses Re: Sorting CSV string and removing Duplicates  (dinesh kumar <dineshkumar02@gmail.com>)
Re: Sorting CSV string and removing Duplicates  (Yves Dorfsman <yves@zioup.com>)
Re: Sorting CSV string and removing Duplicates  (Chris Mair <chris@1006.org>)
List pgsql-general
Hello,

I have a csv string in a text field that is unsorted and contains duplicates.
Is there a simple way to remove these and sort the string.

E.g 
2,18,20,23,1,27,1,2,8,16,17,18,20,22,23,27 

i tried string to array and unique but that did not work...
Any suggestions on how to do this without writing a function?

Any help is appreciated.

Thanks
A

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Problems with timezone
Next
From: dinesh kumar
Date:
Subject: Re: Sorting CSV string and removing Duplicates