Still some problems importing with COPY

From: Jaume Teixi <teixi(at)6tems(dot)com>
To: pgsql-admin(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Still some problems importing with COPY
Date: 2001-02-28 15:44:54
Message-ID: 20010228164454.4b931f24.teixi@6tems.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers

Hi,

I want to import from a .txt file, I usually use:

COPY noticies FROM '/home/teixi/_6tm_/_elbulli/premsai.txt' USING
DELIMITERS '|' \g

a) If table 'noticies' has a date row and is null on data file it claims:
Unable to import date filed ''

so how to admit date fields null?

b) When there are some 'carriage returns' on a field in the data file is
understood as a new

|row1data1|row1data2|row1data3|^M
|row2data1^M
stillrow2data1|row2data2|row2data2|^M

is interpreted as a 3 row data file when in reallity is a 2 row data file.

how could I handle this when importing ?

bests from barcelona,
jaume teixi

ps: weather loops between 5ºC to 30ºC, crazy.

Browse pgsql-admin by date

  From Date Subject
Next Message Christoph Lange 2001-02-28 21:57:05 Installation-trouble
Previous Message Silky Mittal 2001-02-28 11:32:49 Unable to start PostgreSQL from user other than root

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2001-02-28 15:57:26 Re: regression.out and regression.diff
Previous Message Tom Lane 2001-02-28 15:39:26 Re: [HACKERS] BLCKSZ 0?