pgsql: Revert "Refactor CopyReadAttributes{CSV,Text}() to use a callbac

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Revert "Refactor CopyReadAttributes{CSV,Text}() to use a callbac
Date: 2024-02-14 01:07:51
Message-ID: E1ra3kd-0065h3-1C@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Revert "Refactor CopyReadAttributes{CSV,Text}() to use a callback in COPY FROM"

This reverts commit 95fb5b49024, for reasons similar to what led to
1aa8324b81fa. In this case, the callback was called once per row, which
is less worse than the previous callback introduced for COPY TO called
once per argument for each row, still the patch set discussed to plug in
custom routines to the COPY paths would be able to know which subroutine
to use depending on its CopyFromState, so this led to a suboptimal
approach at the end.

For now, this part is reverted to consider better which approach to use.

Discussion: https://postgr.es/m/20240206014125.qofww7ew3dx3v3uk@awork3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/06bd311bce24083c76d9741ae89c98750aaf4b41

Modified Files
--------------
src/backend/commands/copyfrom.c | 5 -----
src/backend/commands/copyfromparse.c | 24 ++++++++++++++++--------
src/include/commands/copyfrom_internal.h | 17 -----------------
3 files changed, 16 insertions(+), 30 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2024-02-14 04:43:18 pgsql: Add a slot synchronization function.
Previous Message Michael Paquier 2024-02-13 23:59:41 pgsql: pgcrypto: Fix incorrect argument vs PG_GETARG*() mappings