Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pd97J-00027C-6l for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Mar 2023 12:23:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pd97H-0002cn-Vu for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Mar 2023 12:23:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pd97H-0002ce-MZ for pgsql-hackers@lists.postgresql.org; Fri, 17 Mar 2023 12:23:27 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pd97A-000687-0o for pgsql-hackers@postgresql.org; Fri, 17 Mar 2023 12:23:27 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id 84C0060862; Fri, 17 Mar 2023 21:23:14 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at oss.nttdata.com MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 17 Mar 2023 21:23:14 +0900 From: torikoshia To: Daniel Gustafsson , Damir Belyalov Cc: PostgreSQL Hackers , Andres Freund , Danil Anisimow , Nikita Malakhov , a.lepikhov@postgrespro.ru, tgl@sss.pgh.pa.us Subject: Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) In-Reply-To: References: <686e46d6718f9535bc39fac7cad7408b@oss.nttdata.com> <769423519e16d18a1e7611c6931da58b@oss.nttdata.com> <20230205233723.xw5z5zmeyc57ezq3@alap3.anarazel.de> <2587470.1675660337@sss.pgh.pa.us> <483E1B59-4A80-450B-8685-7CC12762FD5A@anarazel.de> <2592557.1675663234@sss.pgh.pa.us> <39143e83571d59dfc04c75707fa0ea5a@oss.nttdata.com> <0DE0602F-CC12-40ED-B259-3AB91FB02C3B@yesql.se> <8ad8492ff9fae3481d87c7aab4e0aed0@oss.nttdata.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <9a94e684d6528dff74de5959e97032f3@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 2023-03-07 18:09, Daniel Gustafsson wrote: >> On 7 Mar 2023, at 09:35, Damir Belyalov wrote: > >> I felt just logging "Error: %ld" would make people wonder the meaning >> of >> the %ld. Logging something like ""Error: %ld data type errors were >> found" might be clearer. >> >> Thanks. For more clearance change the message to: "Errors were found: >> %". > > I'm not convinced that this adds enough clarity to assist the user. We > also > shouldn't use "error" in a WARNING log since the user has explicitly > asked to > skip rows on error, so it's not an error per se. +1 > How about something like: > > ereport(WARNING, > (errmsg("%ld rows were skipped due to data type > incompatibility", cstate->ignored_errors), > errhint("Skipped rows can be inspected in the database log > for reprocessing."))); Since skipped rows cannot be inspected in the log when log_error_verbosity is set to terse, it might be better without this errhint. -- Regards, -- Atsushi Torikoshi NTT DATA CORPORATION