aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/complex.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2024-02-05 11:12:37 +0900
committerMichael Paquier <michael@paquier.xyz>2024-02-05 11:12:37 +0900
commit2889fd23be565155c8cd96a8c5a07ac971261515 (patch)
treedf70f744a83375bcdcc18ae8438eee76a730d528 /src/tutorial/complex.c
parent95fb5b49024aa51310f91aba669aaf0bb3227932 (diff)
downloadpostgresql-2889fd23be565155c8cd96a8c5a07ac971261515.tar.gz
postgresql-2889fd23be565155c8cd96a8c5a07ac971261515.zip
Refactor CopyAttributeOut{CSV,Text}() to use a callback in COPY TO
These routines are used by the text and CSV formats to send an output representation of a string, applying quotes if required. This is similar to 95fb5b49024a, reducing the number of "if" branches that need to be checked on a per-row basis when sending representation of fields in text or CSV mode. While on it, this simplifies the signature of CopyAttributeOutCSV() as it is possible to know that an attribute is alone on a line thanks to CopyToState. Headers should not use quotes, even if forced at query level. Extracted from a larger patch by the same author. Author: Sutou Kouhei Discussion: https://postgr.es/m/20231204.153548.2126325458835528809.kou@clear-code.com
Diffstat (limited to 'src/tutorial/complex.c')
0 files changed, 0 insertions, 0 deletions