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 1tBCmR-002TGB-8K for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Nov 2024 12:47:30 +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 1tBCmO-00EDZ2-HV for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Nov 2024 12:47:29 +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 1tBCmO-00EDYm-6V for pgsql-hackers@lists.postgresql.org; Wed, 13 Nov 2024 12:47:28 +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 1tBCmL-001fNU-3P for pgsql-hackers@postgresql.org; Wed, 13 Nov 2024 12:47:27 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id 5843C613B4; Wed, 13 Nov 2024 21:47:21 +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: Wed, 13 Nov 2024 21:47:21 +0900 From: torikoshia To: Kirill Reshke Cc: Fujii Masao , Pgsql Hackers Subject: Re: Add reject_limit option to file_fdw In-Reply-To: References: <54747389a562688eab7077b144daff6a@oss.nttdata.com> <2b3ad6d4-e05f-4188-8cfe-1fd9d949a9c9@oss.nttdata.com> <192ede1e4c2b34b853e5ac46f8dee50b@oss.nttdata.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <153fd507364f195f036695c3bb48cf44@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-11-12 15:23, Kirill Reshke wrote: Thanks for your review! > On Tue, 12 Nov 2024 at 06:17, torikoshia > wrote: >> >> On 2024-11-12 01:49, Fujii Masao wrote: >> > On 2024/11/11 21:45, torikoshia wrote: >> >>> Thanks for adding the comment. It clearly states that REJECT_LIMIT >> >>> can be >> >>> a single-quoted string. However, it might also be helpful to mention >> >>> that >> >>> it can be provided as an int64 in the COPY command option. How about >> >>> updating it like this? >> >>> >> >>> ------------------------------------ >> >>> REJECT_LIMIT can be specified in two ways: as an int64 for the COPY >> >>> command >> >>> option or as a single-quoted string for the foreign table option >> >>> using >> >>> file_fdw. Therefore this function needs to handle both formats. >> >>> ------------------------------------ >> >> >> >> Thanks! it seems better. >> >> >> >> >> >> Attached v3 patch. >> > >> > Thanks for updating the patch! It looks like you forgot to attach it, >> > though. >> >> Oops, thanks for pointing it out. >> Here it is. >> >> >> -- >> Regards, >> >> -- >> Atsushi Torikoshi >> Seconded from NTT DATA GROUP CORPORATION to SRA OSS K.K. > > Hi! > > A little question from me. > > This is your doc for reject_limit: > > + > + reject_limit > + > + > + > + Specifies the maximum number of errors tolerated while > converting a column's > + input value to its data type, the same as > COPY's > + REJECT_LIMIT option. > + > + > + > + > > This is how it looks on the current HEAD for copy. > > > REJECT_LIMIT > > > Specifies the maximum number of errors tolerated while converting > a > column's input value to its data type, when > ON_ERROR is > set to ignore. > If the input causes more errors than the specified value, the > COPY > command fails, even with ON_ERROR set to > ignore. > This clause must be used with > ON_ERROR=ignore > and maxerror must > be positive bigint. > If not specified, > ON_ERROR=ignore > allows an unlimited number of errors, meaning > COPY will > skip all erroneous data. > > > > > There is a difference. Should we add REJECT_LIMIT vs ON_ERROR > clarification for file_fdw too? or maybe we put a reference for COPY > doc. As you may know, some options for file_fdw are the same as those for COPY. While the manual provides detailed descriptions of these options in the COPY section, the explanations in file_fdw are shorter and less detailed. I intended to follow this approach, but do you think it should be changed? -- Regards, -- Atsushi Torikoshi Seconded from NTT DATA GROUP CORPORATION to SRA OSS K.K.