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 1tsH1J-00HVJL-Q2 for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Mar 2025 08:00:53 +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 1tsH1H-00GvVk-Hr for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Mar 2025 08:00:51 +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 1tsH1H-00GvUg-7O for pgsql-hackers@lists.postgresql.org; Wed, 12 Mar 2025 08:00:51 +0000 Received: from mail-ua1-x929.google.com ([2607:f8b0:4864:20::929]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tsH1D-002Oh6-2h for pgsql-hackers@lists.postgresql.org; Wed, 12 Mar 2025 08:00:50 +0000 Received: by mail-ua1-x929.google.com with SMTP id a1e0cc1a2514c-86d6976f768so1101917241.1 for ; Wed, 12 Mar 2025 01:00:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741766447; x=1742371247; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gWsl/+oGRz9CNQnx7xOOnQUD5ZihUzSAFzvrjAcOlAs=; b=VWNCLslN1XjjmiTT1FcWj3uAvIQlO4HRGa3SP4qGX0PHg+n5J2gT1tlKeP+cLbwhxZ 8ks97E9X59U2ThXdcqCZt9rtq0Jr0NOQ9yGvawNJOS0hl5PDLl4Jv7n72vNzMsLJMCrP qgVX9QtyHQ5bMNH05MwUPKBvtl7PcRgU1ymoqW91Kobnp7GU+BoXGMOJS9ond2ydABLr L1y86eswgg02FGfkFR1lJVjTKicVmCeh75GKxT90s2BVnDZVKvz5Ym4yd14WpWJW9Skb LnuCnB/0Y8Vv0bwJcDtdCFqYiYtYBDWfIOX8F9PIqHiKORKgxvSFy8D74IxG3lRHZITM CSCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741766447; x=1742371247; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gWsl/+oGRz9CNQnx7xOOnQUD5ZihUzSAFzvrjAcOlAs=; b=OCKNRG5TGEN6nZ6PybevIL3lCdvYc5Ua1/LYAcVCDYfarNNALO3+hfIjIANWsEeU93 A2umTZTcJKHIg9J1r14/880FZX4dgd3r8GOCvXQIUARi2D/vwy+JDbbAs7nhSn4FDy4V +li0iYIpxUjfh3AxpZSyrwrQZc1FRoX/SHZaoFVbm/68cPWA5IYQ4l+ZjZucKCyZtNtP 87u3GqdiIO4K4wDAFUI4DG+rtj225bRznFwe5zHkIoGgJJIwBD75qiAobozLj9du5Hoy Tlfv6oERSYzgK6h3nLwRVF3VS36Lx+MLP2VXBDiJ18qkackSrjLE8UQ9wPmyAZS1GMvG ofmw== X-Forwarded-Encrypted: i=1; AJvYcCWrSaXeEaJLeHprKwvj7CBhchuloItSwvo45gCbPvJoTVJBZLFZbCzXBohE/ip370ACEr47wUwLgiDK+W1v@lists.postgresql.org X-Gm-Message-State: AOJu0YziXpmdf+3OBrnRERd78HvrgdGlq4phGpy3B7RKbSxyqkceulEl rvDpezQSZD9oAUj/3obggA0MXnFhz3nOsA2edNVtggKDXKS24DBjA3sM+/yMukCNxAXuOWBCJgX lm6fJwbgCPIxTFKJVQ1kiz/ii0Oc= X-Gm-Gg: ASbGncsK+difcjn/j4QVEVb+y9ImL5yqTqbtCRO+bem7NsE4IQZvCre689216AcnfQr +GyL3NnmlbacYDw6fEYyi7WxWuGFJyhiraFLyJuqP9i1i/rO7oSLMBaYFoi0xLoCfslLSVzOt3h qNHYaOFtsa/G0WnlF8A1U0/vHymMD2qgF5xiehsWamh5TIok9Rv5DOLhca X-Google-Smtp-Source: AGHT+IFmuJKoLP9N/l+EO7tIPDDlIGa3ADWBCtjakG7fVmkg0Gan3e5Ovj9lHIxIwtSVuQTm06S7jVWu3gEmAiHdcbw= X-Received: by 2002:a05:6102:578f:b0:4bb:4c52:6730 with SMTP id ada2fe7eead31-4c30a5ec045mr14726219137.12.1741766447458; Wed, 12 Mar 2025 01:00:47 -0700 (PDT) MIME-Version: 1.0 References: <07587c36-18b3-4ccb-b5fb-579bcb04ed37@oss.nttdata.com> <90dc6e9d-9348-485a-b27c-7b1637f06c2e@uni-muenster.de> In-Reply-To: <90dc6e9d-9348-485a-b27c-7b1637f06c2e@uni-muenster.de> From: jian he Date: Wed, 12 Mar 2025 16:00:00 +0800 X-Gm-Features: AQ5f1Jp2aLf1f4y0ly5-hYNpjJ4CGHAA2lO71gnaC6wXCospeS1i_t32f-36uRQ Message-ID: Subject: Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row To: Jim Jones Cc: Kirill Reshke , Fujii Masao , "David G. Johnston" , Yugo NAGATA , torikoshia , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Mar 11, 2025 at 6:31=E2=80=AFPM Jim Jones wrote: > > > I revisited this patch today. It applies and builds cleanly, and it > works as expected. > > Some tests and minor comments: > hi. Jim Jones. thanks for testsing it again! > =3D=3D=3D=3D > > 1) WARNING might be a better fit than NOTICE here. > but NOTICE, on_errror set_to_null is aligned with on_errror ignore. > > I would still leave the extra messages from "log_verbosity verbose" as > NOTICE though. What do you think? > > =3D=3D=3D=3D When LOG_VERBOSITY option is set to verbose, for ignore option, a NOTICE message containing the line of the input file and the column name whose input conversion has failed is emitted for each discarded row; for set_to_null option, a NOTICE message containing the line of the input file and the column name where value was replaced with NULL for each input conversion failure. see the above desciption, on_errror set_to_null is aligned with on_errror ignore. it's just on_errror ignore is per row, on_errror set_to_null is per column/field. so NOTICE is aligned with other on_error option. > > 2) Inconsistent terminology. Invalid values in "on_error set_to_null" > mode are names as "erroneous", but as "invalid" in "on_error stop" mode. > I don't want to get into the semantics of erroneous or invalid, but > sticking to one terminology would IMHO look better. > I am open to changing it. what do you think "invalid values in %llu row was replaced with null"? > =3D=3D=3D=3D > > "on_error ignore" works well with "reject_limit #" > i remember there was some confusion about on_error set_to_null with reject_limit option. I choose to not suport it. obviously, if there is consenses, we can support it later.