How can I create a similar query using Postgres to recreate this MySQL version.
SELECT u.id, GROUP_CONCAT(CONCAT(r.firstname,' ',r.lastname, ' [', r.type,']') SEPARATOR ', ') AS names FROM reference r, users u WHERE r.user_id = u.id GROUP BY r.user_id