From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Refactor CopyReadAttributes{CSV,Text}() to use a callback in COP |
Date: | 2024-02-05 00:47:38 |
Message-ID: | E1rWn98-004hXh-PB@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Refactor CopyReadAttributes{CSV,Text}() to use a callback in COPY FROM
CopyReadAttributes{CSV,Text}() are used to parse lines for text and CSV
format. This reduces the number of "if" branches that need to be
checked when parsing fields in CSV and text mode when dealing with a
COPY FROM, something that can become more noticeable with more
attributes and more lines to process.
Extracted from a larger patch by the same author.
Author: Sutou Kouhei
Discussion: https://postgr.es/m/20231204.153548.2126325458835528809.kou@clear-code.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/95fb5b49024aa51310f91aba669aaf0bb3227932
Modified Files
--------------
src/backend/commands/copyfrom.c | 5 +++++
src/backend/commands/copyfromparse.c | 24 ++++++++----------------
src/include/commands/copyfrom_internal.h | 17 +++++++++++++++++
3 files changed, 30 insertions(+), 16 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2024-02-05 02:12:51 | pgsql: Refactor CopyAttributeOut{CSV,Text}() to use a callback in COPY |
Previous Message | Tom Lane | 2024-02-04 19:17:48 | pgsql: Release notes for 16.2, 15.6, 14.11, 13.14, 12.18. |