Re: Reject HEADER with binary and json COPY formats by option presence

From: Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: Reject HEADER with binary and json COPY formats by option presence
Date: 2026-06-03 05:23:35
Message-ID: CAOzEurS-yMF8v1Lf3XF0aG=T0KnF-A8N-q0C7UrRpfWw8FCK7A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, May 31, 2026 at 10:57 AM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:

> While testing “file_fdw: Support multi-line HEADER option”, I noticed a small issue.

Thanks for reporting this!

> The fix is straightforward. Since we already have the “header_specified" variable to indicate whether the option is present, we can check “header_specified" instead.

Overall, the patch LGTM. Could you add COPY test cases like the following:

copy t to '/tmp/test.json' (format json, header 0);
copy t to '/tmp/test.bin' (format binary, header 0);

--
Best regards,
Shinya Kato
NTT OSS Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Japin Li 2026-06-03 05:58:13 Re: Report oldest xmin source when autovacuum cannot remove tuples
Previous Message Peter Smith 2026-06-03 05:10:00 Improve errmsg for publication membership