| From: | Koshino Taiki <koshino(at)sraoss(dot)co(dot)jp> |
|---|---|
| To: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH v1] psql: Do not complete HEADER MATCH for COPY TO |
| Date: | 2026-11-04 09:18:11 |
| Message-ID: | OS9P286MB6983085D877BEE8DB2584136A694682@OS9P286MB698308.JPNP286.PROD.OUTLOOK.COM |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> The fix looks good, however, there is an earlier patch [1] already.
>
> [1] https://postgr.es/m/CAF1DzPXjeGHhpgKzEWmpuoxdZWwErN79yRodOkwRYAt7Bdn2BA@mail.gmail.com
Hi,
As pointed out, the same issues have already been addressed
in an
earlier patch, so I am withdrawing my patches.
Regards,
Taiki Koshino<koshino(at)sraoss(dot)co(dot)jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/
________________________________
差出人: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
送信日時: 2026年11月4日 16:05
宛先: Koshino Taiki <koshino(at)sraoss(dot)co(dot)jp>
CC: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>; Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
件名: Re: [PATCH v1] psql: Do not complete HEADER MATCH for COPY TO
> On Nov 4, 2026, at 09:24, Koshino Taiki <koshino(at)sraoss(dot)co(dot)jp> wrote:
>
> Hi,
>
> I noticed that psql's tab completion suggests MATCH as a value of the
> HEADER option for both directions of COPY.
>
> For example:
>
> COPY t1 TO STDOUT WITH (HEADER <TAB><TAB>
> false MATCH true
>
> However, the documentation says that HEADER MATCH is valid only for
> COPY FROM. If a user selects the suggested "MATCH" candidate for
> COPY TO, the command fails:
>
> COPY t1 TO STDOUT WITH (HEADER MATCH);
> ERROR: cannot use "match" with HEADER in COPY TO
>
> I think it is misleading for tab completion to suggest syntax that is
> explicitly unsupported by the documentation and rejected by the
> server.
>
> The attached patch checks the COPY direction and offers "MATCH" only
> for COPY FROM. The boolean values remain available in both
> directions, and the change applies to both COPY and \copy completion.
>
> Regards,
>
> Taiki Koshino<koshino(at)sraoss(dot)co(dot)jp>
> SRA OSS K.K.
> TEL: 03-5979-2701 FAX: 03-5979-2702
> URL: https://www.sraoss.co.jp/
>
> <v1-0001-psql-Do-not-complete-HEADER-MATCH-for-COPY-TO.patch>
The fix looks good, however, there is an earlier patch [1] already.
[1] https://postgr.es/m/CAF1DzPXjeGHhpgKzEWmpuoxdZWwErN79yRodOkwRYAt7Bdn2BA@mail.gmail.com
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Koshino Taiki | 2026-11-04 09:18:59 | Re: [PATCH v1] psql: Do not complete JSON format for COPY FROM |
| Previous Message | Amit Kapila | 2026-11-04 09:09:54 | Re: Incorrect CONTEXT reported for errors from parallel apply worker in logical replication |