Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pc6Yu-00029J-2d for pgsql-bugs@arkaria.postgresql.org; Tue, 14 Mar 2023 15:27:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pc6Ys-0006wG-MJ for pgsql-bugs@arkaria.postgresql.org; Tue, 14 Mar 2023 15:27:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pc6Ys-0006w7-E6 for pgsql-bugs@lists.postgresql.org; Tue, 14 Mar 2023 15:27:38 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pc6Yq-0005lf-01 for pgsql-bugs@lists.postgresql.org; Tue, 14 Mar 2023 15:27:38 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 32EFRYwE2631432; Tue, 14 Mar 2023 11:27:34 -0400 From: Tom Lane To: stefan.goldener@theprosperity.company cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17841: COPY Command Invalid QUOTES In-reply-to: <17841-1910e7275380c7d1@postgresql.org> References: <17841-1910e7275380c7d1@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Tue, 14 Mar 2023 14:50:16 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2631430.1678807654.1@sss.pgh.pa.us> Date: Tue, 14 Mar 2023 11:27:34 -0400 Message-ID: <2631431.1678807654@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > The COPY command doesn't quote properly e.g.: > COPY (SELECT *, CURRENT_DATE as partitiondate FROM {table}) TO STDOUT WITH > (DELIMITER '|', QUOTE '\"', FORCE_QUOTE *, FORMAT CSV, HEADER) > delivers: > faasdfagdf|"1234"|| > as output > so the first column is not quoted properly Hm, I failed to duplicate that here, and the relevant code looks pretty straightforward. Can you give a more concrete example? Is this server unmodified community Postgres? (The fact that it's taking QUOTE '\"' without complaint indicates that you're at least running with some nondefault settings.) regards, tom lane