Re: Error while importing CSV file

From: Alban Hertroys <haramrae(at)gmail(dot)com>
To: Lockas <w_ward_w(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Error while importing CSV file
Date: 2012-02-06 11:23:45
Message-ID: CAF-3MvNct63NFvO2bPs_VgN3Hede8pw=y_FUtYrCvnjtNK7HLA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 6 February 2012 07:37, Lockas <w_ward_w(at)hotmail(dot)com> wrote:
> I've tried a lot of sizes
> but I still have messages in my log saying:
>
> *  ---
>  ERROR:  value too long for type character varying(200)
>  --- *
>
> Why is this? There are no other varchar(200) columns in my DB at all,
> no other table. Only this column used to be 25 characters and using
> the alter type command I changed it to 200. It looks alright, the column
> also
> accepts the value, but the error is logged.
>
> I'm confused. How to stop the error?

Perhaps your CSV file doesn't put each record on a new line or
contains an escape at the end of a line that makes the next line part
of it?

--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jasen Betts 2012-02-06 11:29:23 Re: Why this regexp matches?!
Previous Message Jasen Betts 2012-02-06 11:14:30 Re: Why extract( ... from timestamp ) is not immutable?