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 1vqZxZ-00Dbs3-07 for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Feb 2026 16:54:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vqZxY-00A2Yt-1D for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Feb 2026 16:54:33 +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.96) (envelope-from ) id 1vqVkp-008T74-11 for pgsql-bugs@lists.postgresql.org; Thu, 12 Feb 2026 12:25:08 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vqVkn-00000000JOh-3jqt for pgsql-bugs@lists.postgresql.org; Thu, 12 Feb 2026 12:25:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=6CD3SumIh07E7OY3429HOmKckoUoGymNc/M1RoDpyu0=; b=0EXwCkdkYvYhEeZwK983wActX/ 6Lrx5XNKf4Q0D4fY8CbU/724xIrHVZCwHj+/VErs8l9/jsIOoZDgdjeaZZSsgtat1IguGP+72+JKc BIhHzKI5VgJG7xjdWiD3TW7cFta6wNxWVGqr/UmWfBM+yzQ17F7QdYmusUu9/GGffjs3nHJD6Xm+E XLrIyc39aKdJvYqBMf0o6xqIsVZsdXkuB3QipSaBxgupAUrSX59DQUN1quQp2DpmEDXPeQK5JKepj rWvT5HQiCbf7Sb9Kw6O85m/kWGh6yl1gJ+sUPW4vWT7mLYg1kfR/3HjNwlJjlZggUrJeRZWFrwAxN gQZOjCBA==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vqVkm-000qvG-02 for pgsql-bugs@lists.postgresql.org; Thu, 12 Feb 2026 12:25:04 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vqVkk-00222o-1G for pgsql-bugs@lists.postgresql.org; Thu, 12 Feb 2026 12:25:03 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #19403: psql fails when trying to import a file that To: pgsql-bugs@lists.postgresql.org From: PG Bug reporting form Cc: daniel_adeniji@hotmail.com Reply-To: daniel_adeniji@hotmail.com, pgsql-bugs@lists.postgresql.org Date: Thu, 12 Feb 2026 12:24:09 +0000 Message-ID: <19403-59b4099e771c1f2e@postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The following bug has been logged on the website: Bug reference: 19403 Logged by: Daniel Adeniji Email address: daniel_adeniji@hotmail.com PostgreSQL version: 17.6 Operating system: MS Windows 10 ( PostgreSQL 17.6 on x86_64-windows Description: =20 Database Table -------------------- CREATE TABLE public.codeblock ( id int4 NULL, body text NULL ); Text File ----------- Id,Body 1,"{} \. " Command -------------- psql.exe --host --command "\copy public.codeblock from 'c:\tmp\codeblock.csv' WITH (HEADER, FORMAT CSV, ENCODING 'UTF8', DELIMITER ',' )" Error Message reads:- ERROR: unterminated CSV quoted field CONTEXT: COPY codeblock, line 4: "1,"{} \. " The same data works when inserted within an insert statement:- delete from public.codeblock where id =3D 1; insert into public.codeblock ( Id,Body ) values ( 1 ,'{} \. ' ) ; It also works when the server-side copy statement is used:- psql.exe --host --command "copy public.codeblock from 'c:\tmp\codeblock.csv' WITH (HEADER, FORMAT CSV, ENCODING 'UTF8', DELIMITER ',' )" In the example above, \copy is replaced with the copy command and file is availed on the server. Data file availed at 1) One Compiler https://onecompiler.com/text/44dbtdb52 2) GitLab https://gitlab.com/-/snippets/5933548