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 1rTNpT-002Ud9-3L for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Jan 2024 15:09:15 +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 1rTNpS-00H4OK-0H for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Jan 2024 15:09:14 +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 1rTNpR-00H4OC-ND for pgsql-hackers@lists.postgresql.org; Fri, 26 Jan 2024 15:09:13 +0000 Received: from mail-oo1-xc2a.google.com ([2607:f8b0:4864:20::c2a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rTNpL-003USO-43 for pgsql-hackers@lists.postgresql.org; Fri, 26 Jan 2024 15:09:12 +0000 Received: by mail-oo1-xc2a.google.com with SMTP id 006d021491bc7-59883168a83so213822eaf.2 for ; Fri, 26 Jan 2024 07:09:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706281746; x=1706886546; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=CrGHWCKzpKiQXX/1RetKHNOkxpHMcf0ereciOSfUY9Q=; b=X9E6iNqaV60Wrq1o5u1/NK2FpFqtFClWY/SmlD4gtvQSftoB2ShZSGqAh27ytXZpAJ fgfww4Ukea1OQZElS6WYv3M+MSBKdy2m7W40PhZ7/fuhMA6Ruu1fCD1hAebKjmrzVGob i9OXgdPBClBhew+kkl/lSuQCnl27dflGOoro1FNL4ei7/2t123Mjd23I5M1mzTLriLsY 44yyj/1kpRm9tBLx5U8QPf7hankZpMhPQi/rFfY9bqWIEuCPGYkiZmDOtcVpAonxuVAJ nXUo2hOg8wuSnzAas0VQZgk3iy8SiFrpVXYtCw0v/UzETDaa+aTa2Dnv4Pce9odLXnJl bMVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706281746; x=1706886546; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=CrGHWCKzpKiQXX/1RetKHNOkxpHMcf0ereciOSfUY9Q=; b=KcPVYcF16e2CAlArP84KV0TRHcdYL9Ml01LjE9LbN0SBEpQdPtIGtklipoDGelfio1 S3moO01vj+yarMdzPYgZGlkKO9NdmRuALpJN7Ltae6FtDdaVIyXIFev4nUcQLPKkwbua tY+PvsAtaHfW7K4j3emtmzmFhy05AwjbZUKNGvN05uvbFhU9cocPk+xhlRDdCEDhPtd0 D4B4juRSmB/+V22cG2vSaXVoxuM6KqKFM5jhvRM7mFzgVphsUTFVqXbDu5CvQZcX1t3j MO4Us0WiB3S6Azwpy35EYsjMCDXjHcXfVgtdHwFwhhrDTw+KxavAsk0f+Hfv+pt91Xvr sBgg== X-Gm-Message-State: AOJu0Yx20GInBBHo9zfOC75Aeys6ZmaMEpM/HmLCuT8Q72ykcIFkX/ur dOSvwI1VRsRj2VDFvvrzXNUq0MrU6H8WDinJyHOxnga0zsEurh5GtsTFKRpiUgiJslubI3RKFBB ZPVZycgX0FTy0g3ma5VF3rRzNYTwUomej X-Google-Smtp-Source: AGHT+IHo5k0QS7CRuMSNZdj25cAhKEdQUnzju36shxZtu8BFCoMbCeMz1awTwnW1kpT1WMMO6JclljKP/dAc+9uzyi0= X-Received: by 2002:a05:6820:12e:b0:59a:ec8:673 with SMTP id i14-20020a056820012e00b0059a0ec80673mr397750ood.6.1706281746035; Fri, 26 Jan 2024 07:09:06 -0800 (PST) MIME-Version: 1.0 From: "David G. Johnston" Date: Fri, 26 Jan 2024 08:08:29 -0700 Message-ID: Subject: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row To: PostgreSQL Hackers Content-Type: multipart/alternative; boundary="0000000000005bf7a0060fdaad6a" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000005bf7a0060fdaad6a Content-Type: text/plain; charset="UTF-8" Hi, The option choice of "ignore" in the COPY ON_ERROR clause seems overly generic. There would seem to be two relevant ways to ignore bad column input data - drop the entire row or just set the column value to null. I can see us wanting to provide the set to null option and in any case having the option name be explicit that it ignores the row seems like a good idea. David J. --0000000000005bf7a0060fdaad6a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

The option choice of "ign= ore" in the COPY ON_ERROR clause seems overly generic.=C2=A0 There wou= ld seem to be two relevant ways to ignore bad column input data - drop the = entire row or just set the column value to null.=C2=A0 I can see us wanting= to provide the set to null option and in any case having the option name b= e explicit that it ignores the row seems like a good idea.

David J.

--0000000000005bf7a0060fdaad6a--