aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonb_util.c
diff options
context:
space:
mode:
authorMasahiko Sawada <msawada@postgresql.org>2025-02-28 10:29:36 -0800
committerMasahiko Sawada <msawada@postgresql.org>2025-02-28 10:29:36 -0800
commit7717f63006935de00fafd000bff450280508adf1 (patch)
tree02ebf3eb211ef7a54b9d00e55f260fc8b1f835c0 /src/backend/utils/adt/jsonb_util.c
parent77cb08be510623421fc727f35980de5107eea735 (diff)
downloadpostgresql-7717f63006935de00fafd000bff450280508adf1.tar.gz
postgresql-7717f63006935de00fafd000bff450280508adf1.zip
Refactor COPY FROM to use format callback functions.
This commit introduces a new CopyFromRoutine struct, which is a set of callback routines to read tuples in a specific format. It also makes COPY FROM with the existing formats (text, CSV, and binary) utilize these format callbacks. This change is a preliminary step towards making the COPY FROM command extensible in terms of input formats. Similar to 2e4127b6d2d, this refactoring contributes to a performance improvement by reducing the number of "if" branches that need to be checked on a per-row basis when sending field representations in text or CSV mode. The performance benchmark results showed ~5% performance gain in text or CSV mode. Author: Sutou Kouhei <kou@clear-code.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Tomas Vondra <tomas.vondra@enterprisedb.com> Reviewed-by: Junwang Zhao <zhjwpku@gmail.com> Discussion: https://postgr.es/m/20231204.153548.2126325458835528809.kou@clear-code.com
Diffstat (limited to 'src/backend/utils/adt/jsonb_util.c')
0 files changed, 0 insertions, 0 deletions