Strip longest common suffix and concat in Postgres
Given that you have an aggregate that finds the longest common suffix 

WITH x AS( 
    SELECT left(name,length(name)-length(lcs(name) over ())) AS s 
    FROM t WHERE id = 1
)
SELECT string_agg(s,', ') FROM x;