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 1sy6hQ-00EOra-WD for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Oct 2024 09:40:13 +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 1sy6hP-0068Cd-Nr for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Oct 2024 09:40:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sy6hP-0068CU-EB for pgsql-hackers@lists.postgresql.org; Tue, 08 Oct 2024 09:40:11 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sy6hL-003Aks-Ho for pgsql-hackers@lists.postgresql.org; Tue, 08 Oct 2024 09:40:10 +0000 Received: from [192.168.11.3] (p3441209-ipxg13001funabasi.chiba.ocn.ne.jp [58.88.14.209]) by oss.nttdata.com (Postfix) with ESMTPSA id A6BE66059D; Tue, 8 Oct 2024 18:39:57 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: <501f4433-b820-4d26-b7f0-1ab9ccf393b3@oss.nttdata.com> Date: Tue, 8 Oct 2024 18:39:54 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Add new COPY option REJECT_LIMIT Content-Language: en-US To: torikoshia , jian.universality@gmail.com Cc: zhjwpku@gmail.com, pgsql-hackers@lists.postgresql.org 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> From: Fujii Masao In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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. > 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? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION