Re: New "raw" COPY format

From: "Joel Jacobson" <joel(at)compiler(dot)org>
To: "jian he" <jian(dot)universality(at)gmail(dot)com>
Cc: "Masahiko Sawada" <sawada(dot)mshk(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-28 10:20:57
Message-ID: 7b9b0a39-a95c-4192-bc20-b1d988c74c48@app.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 28, 2024, at 10:30, Joel Jacobson wrote:
> On Mon, Oct 28, 2024, at 08:56, jian he wrote:
>> /* Check force_quote */
>> - if (!opts_out->csv_mode && (opts_out->force_quote ||
>> opts_out->force_quote_all))
>> + if (opts_out->format != COPY_FORMAT_CSV && (opts_out->force_quote ||
>> + opts_out->force_quote_all))
>> ereport(ERROR,
>> (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
>> /*- translator: %s is the name of a COPY option, e.g. ON_ERROR */
>>
>> maybe this has a code indentation issue.
>> since "if" and "opts_out" in the same column position.
>
> Thanks for review.
>
> I've fixed the indentation issues.

I've now installed pgindent, and will use it from hereon, to avoid this class of problems.

New version where all three patches are now indented using pgindent.

/Joel

Attachment Content-Type Size
v15-0001-Introduce-CopyFormat-and-replace-csv_mode-and-binary.patch application/octet-stream 18.8 KB
v15-0002-Add-raw-format-to-COPY-command.patch application/octet-stream 42.8 KB
v15-0003-Reorganize-option-validations.patch application/octet-stream 19.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Alena Rybakina 2024-10-28 09:48:19 Re: Consider the number of columns in the sort cost model