Re: Copy Failure - Mailing list pgsql-novice

From
Subject Re: Copy Failure
Date
Msg-id 20050830222715.91175.qmail@web33314.mail.mud.yahoo.com
Whole thread Raw
In response to Copy Failure  (<operationsengineer1@yahoo.com>)
Responses Sorting Challenge  (<operationsengineer1@yahoo.com>)
List pgsql-novice
--- operationsengineer1@yahoo.com wrote:

>
>
> --- Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> > <operationsengineer1@yahoo.com> writes:
> > > i'm trying to copy data from a csv file into a
> > PGSQL
> > > 7.4 database.  i tried tab delimited and i tried
> > comma
> > > delimted.
> >
> > PG 7.4's COPY does not have any support for CSV
> > format (that was added
> > in 8.0).  Tab-delimited should work OK though.
> >
> >             regards, tom lane
> >

Tom and all,

i was able to copy to work...  i saved it in
openoffice.org as a csv file, but i saved it as

Western Europe (ASCII/US)

instead of...

Western Europe (Windows-1252/Latin 1).

the latter inserted a character for for the tab and it
caused problems.

openoffice.org also gave two choice for a text
delimiter (i set the field delimiter to {tab}), ' and
".  when i copied with the text delimiter, the text
delimiter showed up in the pgsql data.

i went back and played with the text delimiter option
and found out that you can delete the text delimiter
resulting in nothing being the text delimiter.

the data copied fine and there was no sign of the text
delimiter in the db.



____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs


pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Disabling Trigger
Next
From: Bruce Momjian
Date:
Subject: Re: Copy function syntax on 8.1