performance improvement pg_copy_to_string