I have prepared a simple SQL Fiddle for my question -
In a word game written in Pl/pgSQL for PostgreSQL 10.2 player moves are stored in the table:
CREATE
Use FORMAT (as described in the manual) to format your string before aggregation:
SELECT STRING_AGG(FORMAT('%s (%s)', word, score), ', ') FROM words_scores WHERE mid=230;
Here's the updated SQL Fiddle.