Re: SuSE 7.1 PostgreSQL COPY

From: "Jeff Eckermann" <jeckermann(at)verio(dot)net>
To: "John Jeffery" <jepjeffery(at)hotmail(dot)com>, <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: SuSE 7.1 PostgreSQL COPY
Date: 2001-08-20 19:08:39
Message-ID: 002e01c129ab$85e07230$279c10ac@INTERNAL
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Likely reason is that the line ending characters in your file are not being
recognized, so PostgreSQL thinks that all of your file is in one line, and
additional fields are being lopped off.
In that case, you should see a warning message from COPY, saying "extra
fields disregarded" or something to that effect.
----- Original Message -----
From: "John Jeffery" <jepjeffery(at)hotmail(dot)com>
To: <pgsql-interfaces(at)postgresql(dot)org>
Sent: Sunday, August 19, 2001 10:02 PM
Subject: [INTERFACES] SuSE 7.1 PostgreSQL COPY

> Hello from Robertson NSW "Babe Country"
> I am trying to do something very simple
> Populate a partshistory table with 8 fields from a text, or csv or tab
> delimited file which was generated on winme using Fortran90
>
> the fields are
> partnum varchar(15)
> partdesc varvhar(20)
> price money
> currency_code char(2)
> discount_code char(2)
> weight int4
> Model_Name char(4)
> Package_Qty int4
> tried COPY from psql with the following;
>
> COPY parthist FROM '/var/lib/pgsql/parthist.txt';
>
> COPY finishes ok but table only imports one field the first one.
> Tried tab delimit , comma, blank, pipe. still the same
> tried import using pgaccess same result
> tried generating file with different order of fields etc
> same result only first field gets into table.
>
> Any suggestions ?
>
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
>

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Barry Lind 2001-08-21 16:45:19 Re: Bad BigDecimal
Previous Message John Jeffery 2001-08-20 03:02:52 SuSE 7.1 PostgreSQL COPY