Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id EDD8A4763C3 for ; Sat, 18 Jan 2003 01:16:18 -0500 (EST) Received: from lx2.regaltronic.com (lx2.regaltronic.com [202.66.16.130]) by postgresql.org (Postfix) with ESMTP id 2C62247632B for ; Sat, 18 Jan 2003 01:16:17 -0500 (EST) Received: (from daemon@localhost) by lx2.regaltronic.com (8.9.3/8.9.3) id OAA23875 for ; Sat, 18 Jan 2003 14:16:14 +0800 Received: from UNKNOWN(192.168.1.17), claiming to be "regaltronic.com" via SMTP by lx2, id smtpda23846; Sat Jan 18 14:16:09 2003 Message-ID: <3E28F128.BA73A07E@regaltronic.com> Date: Sat, 18 Jan 2003 14:16:09 +0800 From: Harry Yau X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en,zh-TW MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Problem with COPY FROM Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/285 X-Sequence-Number: 11150 Hi all, I am trying to copy some date from a text file to pgsql. I am using pgsql 7.3 version. The problem i am face is that i try to copy a TEXT field to a table. I have serveral line in this field. Let say, I have a table T1, and three fields with it, F1, F2, F3. F1 is varchar(5), F2 is text and F3 is int When I pg_dump T1, it show something like ........ COPY T1(F1, F2) FROM stdin; 00001 Line1\r\nLine2\r\nLine3\r\n 1 00002 LineA\r\nLineB\r\nLineB\r\n 3 \. ..... I cut it out and run it. It get me the following error message: ERROR: copy: line 1, value too long for type character(5) Then I thought, the tab(\t) is messed up, so I delete all the space in between the fields and put a tab by myself. The funny thing happen. Sometime, it give me the error message ERROR: copy: line 2, Missing data for column "F2" However, somtime it have no error message and no "COPY" to identicate the sussecc of the command. ( In fact, it didn't copy the data for me!) Please, could anyone help me a bit with the COPY FROM with text field. Thank You very Much! Harry Yau