Re: [GENERAL] COPY ... FROM stdin WITH FORMAT csv - Mailing list pgsql-general

From Paul Jungwirth
Subject Re: [GENERAL] COPY ... FROM stdin WITH FORMAT csv
Date
Msg-id d7e9408c-7c99-e2a1-dd90-4f2ca3f5d142@illuminatedcomputing.com
Whole thread Raw
In response to Re: [GENERAL] COPY ... FROM stdin WITH FORMAT csv  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: [GENERAL] COPY ... FROM stdin WITH FORMAT csv
List pgsql-general
On 03/21/2017 12:21 PM, David G. Johnston wrote:
> >   words=> COPY words_reviews (uid, author, nice, review, updated) FROM
> >   stdin FORMAT csv;
>
> What did you read that lead you to think the above shoud work?

I don't know about COPY FROM, but COPY TO works without parens (or
FORMAT), like this:

db=> copy (select 1+1, 2+2) to stdout with csv;

2,4

(tested on pg 9.5)

I never use parens, so I was surprised to see in the docs and the
replies here that they are necessary. Am I just exploiting a bug in the
parser?

Paul



pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: [GENERAL] COPY ... FROM stdin WITH FORMAT csv
Next
From: "David G. Johnston"
Date:
Subject: Re: [GENERAL] COPY ... FROM stdin WITH FORMAT csv