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 1sy9oh-00Els9-Rj for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Oct 2024 12:59:55 +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 1sy9of-008Xiz-Vl for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Oct 2024 12:59:53 +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 1sy9nm-008UdJ-Ts for pgsql-hackers@lists.postgresql.org; Tue, 08 Oct 2024 12:58:58 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sy9nj-0039AV-Pm for pgsql-hackers@lists.postgresql.org; Tue, 08 Oct 2024 12:58:57 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id CB6D36059D; Tue, 8 Oct 2024 21:58:51 +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=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 08 Oct 2024 21:58:51 +0900 From: torikoshia To: Fujii Masao Cc: jian.universality@gmail.com, zhjwpku@gmail.com, pgsql-hackers@lists.postgresql.org Subject: Re: Add new COPY option REJECT_LIMIT In-Reply-To: <501f4433-b820-4d26-b7f0-1ab9ccf393b3@oss.nttdata.com> References: <63f99327aa6b404cc951217fa3e61fe4@oss.nttdata.com> <6e3dcdc6-8e18-4716-a23b-3bee316aeaa7@oss.nttdata.com> <979c6d306343f3d665d14eab2cd1b7bc@oss.nttdata.com> <920a29a36032befbeb355cbdfbbe0f63@oss.nttdata.com> <54bea7dd-94b1-41f1-a4e9-c5c53cc82ce7@oss.nttdata.com> <644a094c-2c0c-4b5f-b151-3677c7de4ee7@oss.nttdata.com> <5f807fcf3a36df7ba41464ab40b5c37d@oss.nttdata.com> <056a5728cf733685cff7d9b5a8fbb0ad@oss.nttdata.com> <8830518a-28ac-43a2-8a11-1676d9a3cdf8@oss.nttdata.com> <501f4433-b820-4d26-b7f0-1ab9ccf393b3@oss.nttdata.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <98559893e4475fba60c2130a2178a84b@oss.nttdata.com> X-Sender: torikoshia@oss.nttdata.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024-10-08 18:39, Fujii Masao wrote: > On 2024/10/07 21:51, torikoshia wrote: >>> While reviewing, I also noticed that the check for >>> "opts_out->binary && opts_out->on_error != COPY_ON_ERROR_STOP" >>> is similarly placed before setting the defaults, which might not >>> be correct. This check should probably be moved as well. >>> Additionally, the comment mentioning "must do these two" should be >>> updated to "must do these three." These changes should be handled >>> in a separate patch. >> >> Agreed and attached 0002 patch. > > Thanks for updating the 0001 patch and creating the 0002 patch! I've > pushed both. Thanks a lot! > > >> Also considering when REJECT_LIMIT is specified to 1, attached patch >> uses errmsg_plural() instead of errmsg. > > I don't think errmsg_plural() is needed here since, when 1 is > specified, > "rows" should follow "more than REJECT_LIMIT (1)". No? You are right. -- Regards, -- Atsushi Torikoshi NTT DATA Group Corporation