Re: [GENERAL] COPY ... FROM stdin WITH FORMAT csv

2017-03-22 Thread Alexander Farber
Hi David, On Tue, Mar 21, 2017 at 8:21 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > > On Tuesday, March 21, 2017, Alexander Farber wrote: >> >> words=> COPY words_reviews (uid, author, nice, review, updated) FROM stdin FORMAT csv; > > > What did you read that lead you to think the

Re: [GENERAL] COPY ... FROM stdin WITH FORMAT csv

2017-03-21 Thread David G. Johnston
On Tue, Mar 21, 2017 at 1:45 PM, Adrian Klaver wrote: > On 03/21/2017 12:11 PM, Alexander Farber wrote: > >> Thank you - this has worked: >> >> COPY words_reviews (uid, author, nice, review, updated) FROM stdin WITH >> (FORMAT csv); >> 1,2,1,'1 is nice by 2','2017-03-01' >> 1,3,1,'1 is nice by 3'

Re: [GENERAL] COPY ... FROM stdin WITH FORMAT csv

2017-03-21 Thread Adrian Klaver
On 03/21/2017 12:11 PM, Alexander Farber wrote: Thank you - this has worked: COPY words_reviews (uid, author, nice, review, updated) FROM stdin WITH (FORMAT csv); 1,2,1,'1 is nice by 2','2017-03-01' 1,3,1,'1 is nice by 3','2017-03-02' 1,4,1,'1 is nice by 4','2017-03-03' 2,1,1,'2 is nice by 1','2

Re: [GENERAL] COPY ... FROM stdin WITH FORMAT csv

2017-03-21 Thread David G. Johnston
On Tue, Mar 21, 2017 at 12:45 PM, Paul Jungwirth < p...@illuminatedcomputing.com> wrote: > 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 abov

Re: [GENERAL] COPY ... FROM stdin WITH FORMAT csv

2017-03-21 Thread Paul Jungwirth
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:

Re: [GENERAL] COPY ... FROM stdin WITH FORMAT csv

2017-03-21 Thread David G. Johnston
On Tuesday, March 21, 2017, Alexander Farber 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? David J.

Re: [GENERAL] COPY ... FROM stdin WITH FORMAT csv

2017-03-21 Thread Alexander Farber
Thank you - this has worked: COPY words_reviews (uid, author, nice, review, updated) FROM stdin WITH (FORMAT csv); 1,2,1,'1 is nice by 2','2017-03-01' 1,3,1,'1 is nice by 3','2017-03-02' 1,4,1,'1 is nice by 4','2017-03-03' 2,1,1,'2 is nice by 1','2017-03-01' 2,3,1,'2 is nice by 3','2017-03-02' 2,4

Re: [GENERAL] COPY ... FROM stdin WITH FORMAT csv

2017-03-21 Thread Francisco Olarte
Alexander: On Tue, Mar 21, 2017 at 6:31 PM, Alexander Farber wrote: > I keep rereading https://www.postgresql.org/docs/9.6/static/sql-copy.html > but just can't figure the proper syntax to put some records into the table: It's not that complex, let's see > words=> COPY words_reviews (uid, a

Re: [GENERAL] COPY ... FROM stdin WITH FORMAT csv

2017-03-21 Thread John R Pierce
On 3/21/2017 10:31 AM, Alexander Farber wrote: words=> COPY words_reviews (uid, author, nice, review, updated) FROM stdin WITH FORMAT 'csv'; ERROR: syntax error at or near "FORMAT" LINE 1: ...d, author, nice, review, updated) FROM stdin WITH FORMAT 'cs... its just csv, not 'csv' ... And I h

Re: [GENERAL] COPY ... FROM stdin WITH FORMAT csv

2017-03-21 Thread David G. Johnston
On Tue, Mar 21, 2017 at 10:31 AM, Alexander Farber < alexander.far...@gmail.com> wrote: > Good evening, > > I keep rereading https://www.postgresql.org/docs/9.6/static/sql-copy.html > but just can't figure the proper syntax to put some records into the table: > ​[...]​ > > words=> COPY words_revie