Re: copymanager question

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: swaroop <swaroop(dot)belur(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: copymanager question
Date: 2014-09-04 08:38:45
Message-ID: 54082515.9040409@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vinayak 2014-09-04 09:13:04 Re: || operator
Previous Message Giuseppe Broccolo 2014-09-04 07:42:15 Re: GiST index question