Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gUatZ-00067F-AS for pgsql-bugs@arkaria.postgresql.org; Wed, 05 Dec 2018 17:23:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gUatX-00050U-N8 for pgsql-bugs@arkaria.postgresql.org; Wed, 05 Dec 2018 17:23:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gUatX-00050N-DR for pgsql-bugs@lists.postgresql.org; Wed, 05 Dec 2018 17:23:31 +0000 Received: from mail.verite.pro ([185.16.44.216]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gUatT-0001g8-IF for pgsql-bugs@lists.postgresql.org; Wed, 05 Dec 2018 17:23:30 +0000 Received: from genius-map.net (verite.pro [195.154.189.246]) by mail.verite.pro (Postfix) with ESMTP id 1E4098C0233; Wed, 5 Dec 2018 18:18:44 +0100 (CET) Received: by genius-map.net (Postfix, from userid 1001) id 38AC738A2B5C; Wed, 5 Dec 2018 18:23:23 +0100 (CET) Content-Type: text/plain; charset="iso-8859-15" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: BUG #15535: psql: \copy: parse error at... From: "Daniel Verite" To: "Tom Lane" Cc: "David G. Johnston" ,"Voillequin, Jean-Marc" ,"pgsql-bugs@lists.postgresql.org" In-Reply-To: <18991.1544022270@sss.pgh.pa.us> Date: Wed, 05 Dec 2018 18:23:19 +0100 Message-Id: <8116df5b-46d4-4099-b334-bd727e337044@manitou-mail.org> X-Mailer: Manitou v1.7.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tom Lane wrote: > There was a proposal awhile back to provide a variant of \copy > that works more like \g, so you'd enter something like >=20 > COPY (SELECT ...) TO STDOUT > \copyto somefile >=20 > which'd be way more flexible --- the COPY command wouldn't have to > fit on one line, for one thing. But I don't think that's gone > anywhere yet. That would be the proof-of-concept patch posted a few weeks ago here: https://www.postgresql.org/message-id/15dadc39-e050-4d46-956b-dcc4ed098753@= manitou-mail.org There didn't seem to be much of community buy-in for this idea, so I've it let rest for the moment. On one hand, it solves actual problems such as the one mentioned in this bug report, on the other hand I can feel the discomfort of having 3 forms of \copy, in addition to COPY, and that maybe it would create more confusion than benefits, overall. Best regards, --=20 Daniel V=E9rit=E9 PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite