Re: Make COPY format extendable: Extract COPY TO format implementations
Li, Yong <yoli@ebay.com>
> On Jul 25, 2024, at 12:51, Sutou Kouhei <kou@clear-code.com> wrote:
>
> Hi,
>
> THREAD SUMMARY:
Very nice summary.
>
> Implementation:
>
> The v18 patch set is the latest patch set. [6]
> It includes the following patches:
>
> 0001: This adds a basic feature (Copy{From,To}Routine)
> (This isn't enough for extending COPY format.
> This just extracts minimal procedure sets to be
> extendable as callback sets.)
> 0002: This uses Copy{From,To}Rountine for the existing
> formats (text, csv and binary)
> (This may not be committed because there is a
> profiling related concern. See the following section
> for details)
> 0003: This adds support for specifying custom format by
> "COPY ... WITH (format 'my-format')"
> (This also adds a test for this feature.)
> 0004: This exports Copy{From,To}StateData
> (But this isn't enough to implement custom COPY
> FROM/TO handlers as an extension.)
> 0005: This adds opaque member to Copy{From,To}StateData and
> export some functions to read the next data and flush
> the buffer
> (We can implement a PoC Apache Arrow COPY FROM/TO
> handler as an extension with this. [7])
>
> Thanks,
> --
> kou
>
This review is for 0001 only because the other patches are not ready
for commit.
The v18-0001 patch applies cleanly to HEAD. “make check-world” also
runs cleanly. The patch looks good for me.
Regards,
Yong
Commits
-
Refactor Copy{From|To}GetRoutine() to use pass-by-reference argument.
- bacbc4863b3b 18.0 landed
-
Refactor COPY FROM to use format callback functions.
- 7717f6300693 18.0 landed
-
Refactor COPY TO to use format callback functions.
- 2e4127b6d2d8 18.0 landed
-
Another try to fix BF failure introduced in commit ddd5f4f54a.
- 9bc1eee988c3 17.0 cited
-
Revert "Refactor CopyReadAttributes{CSV,Text}() to use a callback in COPY FROM"
- 06bd311bce24 17.0 landed
-
Improve COPY TO performance when server and client encodings match
- b619852086ed 17.0 cited
-
Simplify signature of CopyAttributeOutCSV() in copyto.c
- b9d6038d7048 17.0 landed
-
Revert "Refactor CopyAttributeOut{CSV,Text}() to use a callback in COPY TO"
- 1aa8324b81fa 17.0 landed
-
Refactor CopyAttributeOut{CSV,Text}() to use a callback in COPY TO
- 2889fd23be56 17.0 landed
-
Refactor CopyReadAttributes{CSV,Text}() to use a callback in COPY FROM
- 95fb5b49024a 17.0 landed
-
Add progress reporting of skipped tuples during COPY FROM.
- 729439607ad2 17.0 cited
-
pgbench: Add \syncpipeline
- 94edfe250c6a 17.0 cited
-
meson: Make gzip and tar optional
- 9ca6e7b9411e 17.0 cited
-
Export the external file reader used in COPY FROM as APIs.
- 8ddc05fb01ee 9.1.0 cited