I have similar issue, when executing simple select query text values get ", but when i use function array_agg it adds another ", so values lools like ""hello""; i this is something from new postgres version