Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uXK1U-008Roe-4E for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Jul 2025 13:30:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uXK1S-00DSU1-7B for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Jul 2025 13:30:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uXK1R-00DSTo-Tl for pgsql-hackers@lists.postgresql.org; Thu, 03 Jul 2025 13:30:42 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uXK1P-005Mlc-2f for pgsql-hackers@postgresql.org; Thu, 03 Jul 2025 13:30:41 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id 122A161A5D; Thu, 3 Jul 2025 22:30:35 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Date: Thu, 03 Jul 2025 22:30:34 +0900 From: torikoshia To: Masahiko Sawada Cc: Nathan Bossart , Yugo Nagata , Pgsql Hackers , rmt@lists.postgresql.org Subject: Re: Improve tab completion for COPY In-Reply-To: References: <079e7a2c801f252ae8d522b772790ed7@oss.nttdata.com> <20250507222318.421a6b6bfc311f4cdf07ebc0@sraoss.co.jp> <20250508085335.77b8c480e96f032b87c2d8c3@sraoss.co.jp> <0988d0a8c87c37ec8cb8d3643d9dc35a@oss.nttdata.com> <20250603175801.d1fc50eefb178e5ca7312fd1@sraoss.co.jp> <20250610115954.fac87b39e5dfb91e32071b10@sraoss.co.jp> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <36924a0353817ec90ab23e424a18b3f3@oss.nttdata.com> X-Sender: torikoshia@oss.nttdata.com Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-07-03 11:37, Masahiko Sawada wrote: > On Wed, Jul 2, 2025 at 2:46=E2=80=AFPM torikoshia =20 > wrote: >>=20 >> On 2025-07-01 14:20, Masahiko Sawada wrote: >> > On Thu, Jun 12, 2025 at 3:47=E2=80=AFAM Masahiko Sawada >> > wrote: >> >> >> >> On Tue, Jun 10, 2025 at 1:33=E2=80=AFPM Nathan Bossart >> >> wrote: >> >> > >> >> > On Tue, Jun 10, 2025 at 12:37:48PM -0700, Masahiko Sawada wrote: >> >> > >> > (1) adds tab completion support for the REJECT_LIMIT option,= which was >> >> > >> > introduced in v18 >> >> > >> > (2) splits the tab completion logic between COPY FROM and CO= PY TO to >> >> > >> > reflect their different options. >> >> > > >> >> > > [...] >> >> > > >> >> > > Given REJECT_LIMIT is a new v18 feature, it seems to me that (1= ) is an >> >> > > oversight of this feature, but I also agree that it's not a bug= and >> >> > > doesn't block the release. >> >> > > >> >> > > How does the RMT feel about the change (1)? Nathan, would you = be OK with that? >> >> > >> >> > 0001 sure seems like an oversight in commit 4ac2a9b to me. In an= y case, I >> >> > argued that we should fix tab completion for unlogged partitioned= tables in >> >> > v18 [0], and this seems pretty similar. >> >> > >> >> > >> >> > TBH I'd even say that 0002 is fixing a bug and could be back-patc= hed. I've >> >> > added rmt@ here in case Tomas or Heikki feel differently. >> >> >> >> Thank you for your confirmation. I've just pushed the change (1) an= d >> >> am waiting for more comments on the change (2). >> >> >> > >> > Thinking of the 0002 patch, I'm also inclined to agree that this fix= es >> > a bogus tab completion behavior for COPY command and can be >> > back-patched to v14. In v14, c273d9d8ce reworked the tab completion >> > for COPY command and supports the completion for the options of FORM= AT >> > within a WITH clause so we cannot back-patch it to v13. >>=20 >> Agreed. >>=20 >> > Torikoshi-san, could you please prepare the patch for other branches >> > too if you agree with this direction? >>=20 >> Sure! Attached patches. >=20 > Thank you for updating the patches! The patches mostly look good to > me. As for v3-0002-Improve-tab-completion-for-COPY-options_v17.patch, > please note that we don't support REJECT_LIMIT in v17: >=20 > +/* COPY FROM options */ > +#define Copy_from_options \ > +Copy_common_options, "DEFAULT", "FORCE_NOT_NULL", "FORCE_NULL",=20 > "FREEZE", \ > +"LOG_VERBOSITY", "ON_ERROR", "REJECT_LIMIT" Thanks for your check and correction! > I've attached the updated patches that addressed the above issue and > updated the commit messages. Please review them. Other than the fix you mentioned, the changes are the same as in the=20 v3-0002 patches. I didn=E2=80=99t find any particular issues. > Regards, --=20 Regards, -- Atsushi Torikoshi Seconded from NTT DATA Japan Corporation to SRA OSS K.K.