In honesty I only actually changed the concatinate action. The original SQL (that works in pgAdmin) is as follows.
select rh_pk, rh_company, rh_addr1, rh_pcode, ploc.loc_pcode, cnt_name, cnt_status, cnt_expires, cnt_addr,
concatenate(locs.loc_pcode || ' : ' || locs.loc_vehicles || ', ' ||...