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 1sq97g-007HGf-E7 for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Sep 2024 10:38:25 +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 1sq97f-00FClR-21 for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Sep 2024 10:38:23 +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 1sq97e-00FClH-L8 for pgsql-hackers@lists.postgresql.org; Mon, 16 Sep 2024 10:38:22 +0000 Received: from udcm-wwu2.uni-muenster.de ([128.176.118.28]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sq97b-001T4z-7t for pgsql-hackers@lists.postgresql.org; Mon, 16 Sep 2024 10:38:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uni-muenster.de; i=@uni-muenster.de; q=dns/txt; s=uniout; t=1726483101; x=1758019101; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Rbk/Ns1x1SsezT36g9mKkabXeLPc79+LqSRbO9sWq7E=; b=H6nksGYCVMSrd3hXh9s2xfiiudzFdV/9xqOpnX+IdpK2oKWJfhc20dk8 dZoitSI2tCbToTfHU6BHHQpojPgOnxIuPbXaZ1kg2cS+JWaDYXaefceuD S7Ee96tykiFz6C8i0jo6hiBAlF1qRwBSOf+ZFiPbB3vkybqIrxKqVDyB/ aXeovPlnYT4Eaerg81EyaLsUarJbCaAw8ZZYWDbcHJJRtJh+1x0VUt13b fMwupwoXZm12xY82E7RgZfeKXA0NQTODmlb0nZq0vaiLMJ5HArHO7yczq M2gTYvIRHXkx/9doXp78ux5ZsLlJzChNaUS4WrWLhPtxuEZaV4jN3dIKl A==; X-CSE-ConnectionGUID: 8W/6ChFaRVqUDjw2ofT67g== X-CSE-MsgGUID: qZ/sncxFQpKTmGP+Px57tg== X-IronPort-AV: E=Sophos;i="6.10,233,1719871200"; d="scan'208";a="335623411" Received: from secmail.uni-muenster.de ([128.176.118.4]) by UDCM-RELAY2.UNI-MUENSTER.DE with ESMTP; 16 Sep 2024 12:38:20 +0200 Received: from [10.68.98.60] (vpn-pool1-pnt-24892.uni-muenster.de [10.68.98.60]) by SECMAIL.UNI-MUENSTER.DE (Postfix) with ESMTPSA id F20D120ADF0B; Mon, 16 Sep 2024 12:38:17 +0200 (CEST) Message-ID: Date: Mon, 16 Sep 2024 12:38:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row To: jian he Cc: "David G. Johnston" , Yugo NAGATA , torikoshia , PostgreSQL Hackers References: <20240129172858.ccb6c77c3be95a295e2b2b44@sraoss.co.jp> <04bf425ad1b15a4daefe96c478a5253b@oss.nttdata.com> <20240206191937.72eaf0ccc20cfea37944b422@sraoss.co.jp> <76da9fcc-93c5-4053-872e-12932a95356d@uni-muenster.de> <6eac5b45-7f45-4c7a-aae1-e90db8be2e08@uni-muenster.de> <3d6b5885-16a1-475d-b56f-41701c48d9d4@uni-muenster.de> Content-Language: en-US From: Jim Jones In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12.09.24 12:13, jian he wrote: > please check the attached file. v4 applies cleanly, it works as expected, and all tests pass. postgres=# \pset null '(NULL)' Null display is "(NULL)". postgres=# CREATE TEMPORARY TABLE t2 (a int, b int); CREATE TABLE postgres=# COPY t2 (a,b) FROM STDIN WITH (on_error set_to_null, format csv); 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. >> 1,a >> 2,1 >> 3,2 >> 4,b >> a,c >> \. COPY 5 postgres=# SELECT * FROM t2;    a    |   b     --------+--------       1 | (NULL)       2 |      1       3 |      2       4 | (NULL)  (NULL) | (NULL) (5 rows) Perhaps small changes in the docs: set_to_null means the input value will set to null and continue with the next one. "will set" -> "will be set" "and continue with" -> "and will continue with" Other than that, LGTM. Thanks! -- Jim