I have a database table (UTF-8) with a lot of names in different languages with lots of special characters. In another script I use these names and one part is to replace the special characters. To know all appearing characters I need to get a list of them from somewhere.
Is it possible to get a distinct list of characters appearing in a column? What would be the way in PostgreSQL?
For example I have a table with names:
id | name ----------- 1 | Peter 2 | Andrea 3 | Bob
The resulting list would be
The order is not important but could be alphabetical