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.96) (envelope-from ) id 1w2TEB-000Jm2-0f for pgsql-general@arkaria.postgresql.org; Tue, 17 Mar 2026 12:08:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2TE8-000vu6-2K for pgsql-general@arkaria.postgresql.org; Tue, 17 Mar 2026 12:08:48 +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.96) (envelope-from ) id 1w2TE7-000vqb-1k for pgsql-general@lists.postgresql.org; Tue, 17 Mar 2026 12:08:48 +0000 Received: from omr-01.pc5.atmailcloud.com ([103.150.252.74]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w2TE2-00000000BEf-1ULl for pgsql-general@postgresql.org; Tue, 17 Mar 2026 12:08:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tpg.com.au; s=202309; h=MIME-Version:Content-Type:Date:To:From:Subject:Message-ID; bh=4dL1vVwVAqHsk1AQa3IhqGbN4Vk6wJIzoR9KRYHZM1o=; b=sYjjCAeqN52BnZASGgCHlmArEI i28bwf7Dnq5vamwY9SNbOE46iO7PbyVyxFFBt0O1h0ceo0qPZt+64KiJTMAhfXipWMVAisFkJ4pD3 PAJbSkjGKW+NM7ImbcLpX72PxkVxptFDU7cyy6yi5fGHN8QMf8Wd6D0eNfhfbiNMeFULBbOvCmOs8 +Xb5ToQUBxnES54/Hdw+YONhNNzjBwZ3zVNnPVBi3UHs/wl/4OP+NKqzRpuNNeT3X0qq6jPe8jrS6 QNnNy9kN7sHl/wcYlWoCXNAtkX/rZrnuVIpuKls0kI1qajXnrLr9JgLxqhlN5EMrGQLVS1QkuLKIE H2CURT6g==; Received: from cmr-kakadu02.internal.pc5.atmailcloud.com (cmr-kakadu02.internal.pc5.atmailcloud.com [192.168.1.4]) by omr-01.pc5.atmailcloud.com (Exim/cmr-kakadu02.i-049479c559db1e238) with ESMTPS (envelope-from ) id 1w2TE0-0000000DToA-0EYX ; Tue, 17 Mar 2026 12:08:40 +0000 Received: from [203.220.122.213] (helo=[192.168.1.103]) by cmr-kakadu02.i-049479c559db1e238 with esmtpsa (envelope-from ) id 1w2TDu-00000007sOi-0oSQ; Tue, 17 Mar 2026 12:08:35 +0000 Message-ID: <327a4bfde1f1c55e50d0436c0f6dceb41e4afc75.camel@tpg.com.au> Subject: Re: Using \copy to populate a table From: rob stone To: Brent Wood Cc: "pgsql-general@postgresql.org" Date: Tue, 17 Mar 2026 23:08:29 +1100 In-Reply-To: References: <43388977a1cdbde81043c690b41e0647e9b95a2b.camel@tpg.com.au> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2-8 MIME-Version: 1.0 X-Atmail-Id: floriparob@tpg.com.au X-atmailcloud-spam-action: X-AVAS-Report: RCVD_TLS_ALL(0.00) FROM_HAS_DN(0.00) FROM_EQ_ENVFROM(0.00) UNKNOWN_SENDER(0.50) CLOUDMARK_NOT_SPAM(-10.00) TO_MATCH_ENVRCPT_ALL(0.00) MIME_GOOD(-0.10) RCPT_COUNT_TWO(0.00) MID_RHS_MATCH_FROM(0.00) RCVD_VIA_SMTP_AUTH(0.00) ARC_NA(0.00) ASN(0.00) RCVD_COUNT_ONE(0.00) MIME_TRACE(0.00) TO_DN_SOME(0.00) FREEMAIL_FROM(0.00) TO_DN_EQ_ADDR_SOME(0.00) CYREN_UNKNOWN(0.00) BAYES_SPAM(0.00) FREEMAIL_ENVFROM(0.00) X-atmailcloud-route: unknown List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, 2026-03-15 at 07:21 +0000, Brent Wood wrote: >=20 >=20 >=20 > Have you tried explicitly specifying the string to represent null > values? >=20 >=20 > COPY table_name FROM 'path/to/file' WITH (FORMAT text, NULL 'null'); > -- Or the older syntax: > COPY table_name FROM 'path/to/file' WITH DELIMITER ',' NULL AS > 'null'; >=20 >=20 Hello, I took on board Adrian's suggestion and went back to the source and had the file recreated and it has now been loaded successfully. Cheers, Rob