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 1rb4ts-00D2na-3o for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Feb 2024 20:33:36 +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 1rb4tq-004Jix-S8 for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Feb 2024 20:33:34 +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 1rb4sQ-004Fwg-2Q for pgsql-hackers@lists.postgresql.org; Fri, 16 Feb 2024 20:32:06 +0000 Received: from mail-oo1-xc2c.google.com ([2607:f8b0:4864:20::c2c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rb4sN-0076YP-GM for pgsql-hackers@lists.postgresql.org; Fri, 16 Feb 2024 20:32:04 +0000 Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-59927972125so1515782eaf.3 for ; Fri, 16 Feb 2024 12:32:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708115523; x=1708720323; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=TghdDC8ZGeHdNJw0Sg2QQL/YaEABcBQBmO8gwa1LsCw=; b=Is1HqNN2lnnwQvQLL1oKyQMFdLJcdqtOjPNt/gf2rt8MDBQYPfunPsCa21YsM23/tF x3WsibJGvJOq7rFJehzv6PKiqR+JqDVnKzijZK8Tp3oXnt+kfSJZ5Iyq0PZt/Kmuxwst 7L2gh/zH6m3Qu6cTowO2z0dNrNKDOZEMbDUrWkAXEl0vUmtJ0i7BpD4Qowav7GhGYyHV 3dSlZ/QB+9tXjKBaE7IEXoAyQ5mo8NekFvcEolbZ4LXLPCiiH94r5EmGAqSu/1zzokll s4da3ICXFLI85bJBSPhbWkgvx7HIH6+XkOl2EAF/FtXsz+uyYpBYzRHexU3grggAMLUu 3J/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708115523; x=1708720323; h=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=TghdDC8ZGeHdNJw0Sg2QQL/YaEABcBQBmO8gwa1LsCw=; b=Z24AWr0SZelAUewL25zTIzGYlAEdbOA3mGVxMhnhMx9Uf0nWuHt0KjbTmsWg1PMAZI vCjunjJVR109cyuKmMmZKXYV0isZ0hkuBrCSmEtJEfQIkWPa/516Cao61UnnO5YAEE26 +SZyZn8ulc/Pu/oXxvwmnqUrGarKeh3NwcBzW0XeLmGRCkb8FvpWsyHrJaxHedV47OZZ rbBI1LDibLiDTrd8FpaHyF5jvvv6hBcK3QCwpU5xl3W3FleVd4f99xa/Ox2Cr4jfQnQf +wyvkmk1jXh80SncGfZloipHhGcdoGJeP0kk5VZ1kqon4rXpyLNSbe796bwW8wa3LAeC 2ZnQ== X-Forwarded-Encrypted: i=1; AJvYcCUOhg2LEWddW4zKvK+678EzcnFlsHLOHZzS6VRN3VGIPeMEH4BK78tUHBSsc+gTlu5OnMiJ49Cfqzn8bxlHMN6HXOhDP++seWgdBWA5+md3oH2v X-Gm-Message-State: AOJu0YxWjnbcdW1tYrp6QQJqJnRmowAPYhOvRtv+nz/CSLybhNzvsbdP O7yBCblK0rGUQKJUm4Da2SLsqzK/6rOgwZ9vgNc+4jRWRvlysAqCo8zOOM4RrMXqoKgkHPuEgB6 +VwWgkPthcLg4vEF1Gftqp7hlpFEqU/YR X-Google-Smtp-Source: AGHT+IF+v4o8TiSZzuY1Q3sK5Dl18bKz7A0h8hhHbzDLCYv+TFqJuxKe4xCZmgodvCDG6iSphfKgTCJW6Es+nmKdsCQ= X-Received: by 2002:a4a:384f:0:b0:59d:35d7:a568 with SMTP id o15-20020a4a384f000000b0059d35d7a568mr6399050oof.7.1708115522925; Fri, 16 Feb 2024 12:32:02 -0800 (PST) MIME-Version: 1.0 References: <20240129172858.ccb6c77c3be95a295e2b2b44@sraoss.co.jp> <04bf425ad1b15a4daefe96c478a5253b@oss.nttdata.com> <20240206191937.72eaf0ccc20cfea37944b422@sraoss.co.jp> <76da9fcc-93c5-4053-872e-12932a95356d@uni-muenster.de> In-Reply-To: <76da9fcc-93c5-4053-872e-12932a95356d@uni-muenster.de> From: "David G. Johnston" Date: Fri, 16 Feb 2024 13:31:25 -0700 Message-ID: Subject: Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row To: Jim Jones Cc: jian he , Yugo NAGATA , torikoshia , PostgreSQL Hackers Content-Type: multipart/alternative; boundary="000000000000fabba7061185a237" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000fabba7061185a237 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Feb 16, 2024 at 1:16=E2=80=AFPM Jim Jones wrote: > In case all columns of a record have been set to null due to data type > incompatibility, should we insert it at all? Yes. In particular not all columns in the table need be specified in the copy command so while the parsed input data is all nulls the record itself may not be. The system should allow the user to exclude rows with incomplete data by ignoring a not null constraint violation. In short we shouldn't judge non-usefulness and instead give tools to the user to decide for themselves. David J. --000000000000fabba7061185a237 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Feb 16, 2024 at 1:16=E2=80=AFPM Jim Jones <jim.jones@uni-muenster.de> = wrote:
In case all columns of a record have been = set to null due to data type
incompatibility, should we insert it at all?

Yes.=C2=A0 In particular not all columns in the table need be specifie= d in the copy command so while the parsed input data is all nulls the recor= d itself may not be.

The system should allow the use= r to exclude rows with incomplete data by ignoring a not null constraint vi= olation.

In short we shouldn't judge non-use= fulness and instead give tools to the user to decide for themselves.
<= div>
David J.

--000000000000fabba7061185a237--