Received: from island.6tems.com ([195.77.213.6]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1SFg6x43706; Wed, 28 Feb 2001 10:42:07 -0500 (EST) (envelope-from teixi@6tems.com) Received: from thinkpad (studio.6tems.com [195.77.213.230]) by island.6tems.com (8.11.1/8.11.1/Islandmail 8.11.0-6) with SMTP id f1SFdKU18194; Wed, 28 Feb 2001 16:39:20 +0100 X-Authentication-Warning: island.6tems.com: Host studio.6tems.com [195.77.213.230] claimed to be thinkpad Date: Wed, 28 Feb 2001 16:44:54 +0100 From: Jaume Teixi To: pgsql-admin@postgresql.org, pgsql-hackers@postgresql.org Subject: Still some problems importing with COPY Message-Id: <20010228164454.4b931f24.teixi@6tems.com> X-Mailer: Sylpheed version 0.4.61 (GTK+ 1.2.8; Linux 2.2.17; i686) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Archive-Number: 200102/230 X-Sequence-Number: 837 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.