Revert "Refactor CopyAttributeOut{CSV,Text}() to use a callback in COPY TO"
authorMichael Paquier <michael@paquier.xyz>
Tue, 6 Feb 2024 23:04:26 +0000 (08:04 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 6 Feb 2024 23:04:26 +0000 (08:04 +0900)
commit1aa8324b81fa4979ffdc6ccf81d560eac9446948
tree4e1da5da93503d02f4fffd9b0084d7a27a76ac0d
parente4b27b53552c19c50b3ca00b697a1f745c247d0d
Revert "Refactor CopyAttributeOut{CSV,Text}() to use a callback in COPY TO"

This reverts commit 2889fd23be56, following a discussion with Andres
Freund as this callback, being called once per attribute when sending a
relation's row, can involve a lot of indirect function calls (more
attributes to deal with means more impact).  The effects of a dispatch
at this level would become more visible when improving the per-row code
execution of COPY TO, impacting future potential performance
improvements.

Discussion: https://postgr.es/m/20240206014125.qofww7ew3dx3v3uk@awork3.anarazel.de
src/backend/commands/copyto.c