From: | "Joel Jacobson" <joel(at)compiler(dot)org> |
---|---|
To: | "Masahiko Sawada" <sawada(dot)mshk(at)gmail(dot)com> |
Cc: | "jian he" <jian(dot)universality(at)gmail(dot)com>, "Tatsuo Ishii" <ishii(at)postgresql(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: New "raw" COPY format |
Date: | 2024-10-24 06:30:03 |
Message-ID: | 6330c71f-d0e7-4759-977b-bf6c7af13f76@app.fastmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Oct 24, 2024, at 03:54, Masahiko Sawada wrote:
> I have one question:
>
> From the 0001 patch's commit message:
>
> No behavioral changes are intended; this is a pure refactoring to improve code
> clarity and maintainability.
>
> Does the reorganization of the option validation done by this patch
> also help make the 0002 patch simple or small?
Thanks for the review. No, not much, except the changes necessary to
ProcessCopyOptions for raw, without also refactoring it, makes it
more complicated.
> If not much, while it
> makes sense to me that introducing the CopyFormat enum is required by
> the 0002 patch, I think we can discuss the reorganization part
> separately. And I'd suggest the patch organization would be:
>
> 0001: introduce CopyFormat and replace csv_mode and binary fields with it.
> 0002: add new 'raw' format.
> 0003: reorganize option validations.
>
> One benefit would be that we can remove the simple replacements like
> '->binary' with '.format == COPY_FORMAT_BINARY' from the
> reorganization patch, which makes it small. The 0001 and 0002 patches
> that seem to be more straightforward are independent from the 0003
> patch, and we can discuss how to make the option validations including
> the new 'raw' format better.
Sure, that works for me.
I've attached patches organized like that.
/Joel
Attachment | Content-Type | Size |
---|---|---|
v13-0001-Introduce-CopyFormat-and-replace-csv_mode-and-binary.patch | application/octet-stream | 18.6 KB |
v13-0002-Add-raw-format-to-COPY-command.patch | application/octet-stream | 43.0 KB |
v13-0003-Reorganize-option-validations.patch | application/octet-stream | 20.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2024-10-24 06:33:13 | Re: Wrong result when enable_partitionwise_join is on if collation of PartitionKey and Column is different. |
Previous Message | Peter Smith | 2024-10-24 06:27:25 | Re: Refactor to use common function 'get_publications_str'. |