I get an error for the request below. Mostly use || and distinct together.
select string_agg( 'pre' || distinct user.col, 'post')
It works great, like this one.
select string_agg( 'pre' || user.col, 'post')
& this is
select string_agg(distinct user.col, 'post')
source share