Re: copymanager question - Mailing list pgsql-general

From Craig Ringer
Subject Re: copymanager question
Date
Msg-id 54082515.9040409@2ndquadrant.com
Whole thread Raw
In response to Re: copymanager question  (swaroop <swaroop.belur@gmail.com>)
List pgsql-general
On 09/02/2014 06:20 PM, swaroop wrote:
> To summarize - how do i replace the input strings in java (data is streamed
> in and i do a copy to postgres)
> so that CSV copy does not fail.
> a. words with comma
> b. words with double quotes in them
> c. words with \ (backslash)

Don't write the escaping yourself.

Use a CSV library that can consume your input data and emit correct CSV.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-general by date:

Previous
From: Giuseppe Broccolo
Date:
Subject: Re: GiST index question
Next
From: Vinayak
Date:
Subject: Re: || operator