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 1twxom-001Pci-Vb for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Mar 2025 06:31:20 +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 1twxol-00GyST-9Y for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Mar 2025 06:31:19 +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 1twxok-00GySL-TC for pgsql-hackers@lists.postgresql.org; Tue, 25 Mar 2025 06:31:18 +0000 Received: from mail-yw1-x112d.google.com ([2607:f8b0:4864:20::112d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1twxoi-0011WI-1k for pgsql-hackers@lists.postgresql.org; Tue, 25 Mar 2025 06:31:18 +0000 Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-6f6c90b51c3so58483047b3.2 for ; Mon, 24 Mar 2025 23:31:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742884275; x=1743489075; 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=liSu6dOfHTXta7dPttZyrPB70LRZHj6UH2byVkXUtdc=; b=Sz6lps8NNqlCnEuOMsjRagJES10HWK+zEappTAEy/45kOzKRyGs3x3rSl+nLMp9Mtv 2cYX83xy8JEmby9dGIhjy3JWYuA0Owy5z2fpnBMEJIuokCP4c4IQdS5qMKgw4ak2TVXS 1Mk82auggWnuFxOwM5HcN73sUdLW5DjfRgj5ClcIEi5uoCHwsOjNY0njMMJbSF2cfvmX K3cHeveEuN4PgSvurF+jVqLQ8z5OxnuBirm7GG3rqu846hbNMRsGGY0vWTSoCLTDwkgJ jNTAcnv5Fy9NIWX2OGHOcbmLJOkpDv+YpNAbMFpcFjvl1KG2SFf+wLBsh7NKERTJMse7 6+HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742884275; x=1743489075; 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=liSu6dOfHTXta7dPttZyrPB70LRZHj6UH2byVkXUtdc=; b=obpNcWUuZazclAtVJkqnltTvhb2/7UF9jdqtLXJJCfRthj62Vo862+gOHMU7aOGXQR gqTsaa4rgWqcDMMbB23fr2CRZoFkLnsTpDwvVVY0jMVwbZZrqraWu04MgPdT22l0SxI1 rC2Xc2/jkdFv/TozMLmI3/hVu0lxoTqB0te0yjvvkBYjvGDI8xSApMvh6mFBB5fe7YxL V6NMd+FVRn8VLeWyKyygeX4OSdIJk7uuHysajNiz3scYR8w7eeN5m9/+k8zSiPrL9Dny zRnIOGzAEns2tSWC6c6PcrtT6uCDUtFEBpSwBnQECP4T5VrTJkkwP2nRs9IYrSrkhn6l mf8w== X-Forwarded-Encrypted: i=1; AJvYcCVCog5RxFS+3q34g/DjBtFqPLXKed9FLSRv6yDLVJv+uYPCrr0thYDbkuzjtiK+37mc7OU29skejjSa6Vo1@lists.postgresql.org X-Gm-Message-State: AOJu0YwdseGq5dwI0PF600UGZBs1fFymgoTL3yVNYv9YfNGpKE8yk6kA BAw+CT0P+6ui9BJRHaDfxary5rhIZKuvOgB5w0hXn+MfKw4QSMmEIxE9irmgwy75p2R39jLtWfp iEzZuAPOg7K4jNyeHAu3h1vHbPNM= X-Gm-Gg: ASbGncubp4msH1SZwRn6iS5sKDpYOZWtoVJGY+AeCYcezFeUuIoUqqa4RA0aCM6tzEL nQyE8yi3j3yCsHkjNC5crUPPm2Vbucnra+IENqQyqZD2je/VzZ1BQoFAchV1dgTx9PexJTNLPJZ BlDXAEMDWyCQyNeLq0B7EfSr3yrg== X-Google-Smtp-Source: AGHT+IFlESvdK+e6WPu4/Gi3c3BLGZEIEDoW2L11J5QfRYb5wd0R8DBboJAhj9HrYdkSSy82lHp0VOPpp3FqQvCzWkI= X-Received: by 2002:a05:690c:6808:b0:6ef:9e74:c09b with SMTP id 00721157ae682-700bad2457cmr207142857b3.33.1742884274802; Mon, 24 Mar 2025 23:31:14 -0700 (PDT) MIME-Version: 1.0 References: <90dc6e9d-9348-485a-b27c-7b1637f06c2e@uni-muenster.de> In-Reply-To: From: vignesh C Date: Tue, 25 Mar 2025 12:01:03 +0530 X-Gm-Features: AQ5f1JpjkYvYFXutcBdhGwXIcprbrJQTOJZu1W596S45qKDrs-IyABOh3JpDKVk Message-ID: Subject: Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row To: jian he Cc: Jim Jones , Kirill Reshke , Fujii Masao , "David G. Johnston" , Yugo NAGATA , torikoshia , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 24 Mar 2025 at 13:21, jian he wrote: > > I am not sure this is what we want. > Anyway, I attached both two version Few comments 1) I understood the problem, your first approach is ok for me. 2) Here in error we say column c1 violates not-null constraint and in the context we show column c2, should the context also display c2 column: postgres=# create table t3(c1 int not null, c2 int, check (c1 > 10)); CREATE TABLE postgres=# COPY t3 FROM STDIN WITH (on_error set_to_null); Enter data to be copied followed by a newline. End with a backslash and a period on a line by itself, or an EOF signal. >> a b >> \. ERROR: null value in column "c1" of relation "t3" violates not-null constraint DETAIL: Failing row contains (null, null). CONTEXT: COPY t3, line 1, column c2: "b" 3) typo becomen should be become: null will becomen reserved to non-reserved 4) There is a whitespace error while applying patch Applying: COPY (on_error set_to_null) .git/rebase-apply/patch:39: trailing whitespace. a NOTICE message indicating the number of rows warning: 1 line adds whitespace errors. Regards, Vignesh