Re: Error while importing CSV file

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Lockas <w_ward_w(at)hotmail(dot)com>
Subject: Re: Error while importing CSV file
Date: 2012-02-07 14:53:27
Message-ID: 201202070653.27895.adrian.klaver@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Monday, February 06, 2012 9:43:35 pm Lockas wrote:
> OK .. my offending line number is 4533
> How can i remove it while copying ?

As others have said if it is just the one line remove it manually and then do
the COPY.

If there are many lines and if you will dealing with this on a recurring basis I
would suggest taking a look at pgloader:

http://pgloader.projects.postgresql.org/

There is a bit of learning curve, but it will do the clean up for you.

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2012-02-07 15:06:49 Re: How to write in Postgres
Previous Message Adrian Klaver 2012-02-07 14:49:01 Re: default database selector