Hi,
I propose a patch that ensures `pg_convert` doesn't allocate and copy data when no conversion is done. It is an unnecessary overhead, especially when such conversions are done frequently and for large values.
I've tried measuring the performance impact, and the patched version has a small but non-zero gain.
The patch builds against `master` and `make check` succeeds.
Happy to hear any feedback!