Revert "Refactor CopyAttributeOut{CSV,Text}() to use a callback in COPY TO"
Michael Paquier <michael@paquier.xyz>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/copyto.c | modified | +15 −32 |
Discussion
- Make COPY format extendable: Extract COPY TO format implementations 339 messages · 2023-12-04 → 2026-06-26