Re: [GENERAL] Piping CSV data to psql when executing COPY .. FROM STDIN (Solved)

2008-10-30 Thread Roberts, Jon
> I am however unable to do the same successfully (the Java code simply > hangs, probably as a result of the second psql not getting the input to > it) from Java code using objects of ProcessBuilder and Process. I have > used threads consume the STDOUT and STDERR streams (I write the STDOUT > strea

Re: [GENERAL] Piping CSV data to psql when executing COPY .. FROM STDIN (Solved)

2008-10-29 Thread Sam Mason
On Wed, Oct 29, 2008 at 12:11:43PM +0200, Allan Kamau wrote: > I am however unable to do the same successfully (the Java code simply > hangs, probably as a result of the second psql not getting the input to > it) from Java code using objects of ProcessBuilder and Process. Why don't you use the J

Re: [GENERAL] Piping CSV data to psql when executing COPY .. FROM STDIN (Solved)

2008-10-29 Thread Allan Kamau
Thanks Reid, Sam and others. Indeed the oversight was once again at my end. As rightfully pointed out I was using tab as a delimiter where the copy command "COPY abc FROM STDIN WITH CSV HEADER" expects a comma character and will ignore the first line. It does work appropriately when I pipe the

Re: [GENERAL] Piping CSV data to psql when executing COPY .. FROM STDIN

2008-10-28 Thread Reid Thompson
Allan Kamau wrote: Reid Thompson wrote: Allan Kamau wrote: Sam, I have been unable to understand your shell script well enough to use it. Seems am slow this afternoon :-) On this list I saw a message detailing using copy as illustrated below (see )when I run this command I get the following

Re: [GENERAL] Piping CSV data to psql when executing COPY .. FROM STDIN

2008-10-28 Thread Sam Mason
On Tue, Oct 28, 2008 at 03:11:05PM +0200, Allan Kamau wrote: > Sam, I have been unable to understand your shell script well enough to > use it. Seems am slow this afternoon :-) Don't worry, I've just spent an hour going through three computers trying to figure out why they didn't work. In the en

Re: [GENERAL] Piping CSV data to psql when executing COPY .. FROM STDIN

2008-10-28 Thread Reid Thompson
Allan Kamau wrote: Sam, I have been unable to understand your shell script well enough to use it. Seems am slow this afternoon :-) On this list I saw a message detailing using copy as illustrated below (see )when I run this command I get the following output (see ) COPY abc FROM STDIN WIT

Re: [GENERAL] Piping CSV data to psql when executing COPY .. FROM STDIN

2008-10-28 Thread Allan Kamau
Reid Thompson wrote: Allan Kamau wrote: Sam, I have been unable to understand your shell script well enough to use it. Seems am slow this afternoon :-) On this list I saw a message detailing using copy as illustrated below (see )when I run this command I get the following output (see ) C

Re: [GENERAL] Piping CSV data to psql when executing COPY .. FROM STDIN

2008-10-28 Thread Allan Kamau
Sam, I have been unable to understand your shell script well enough to use it. Seems am slow this afternoon :-) On this list I saw a message detailing using copy as illustrated below (see )when I run this command I get the following output (see ) COPY abc FROM STDIN WITH CSV HEADER; \. 1

Re: [GENERAL] Piping CSV data to psql when executing COPY .. FROM STDIN

2008-10-28 Thread Sam Mason
On Tue, Oct 28, 2008 at 01:25:00PM +0200, Allan Kamau wrote: > The alternative I am attempting is to use "COPY abc FROM STDIN WITH > HEADER". I pipe the contents of the CSV file on my PC to the psql > command (that connects to the remote PC) while issuing this copy command. > This does seems not