Re: Copy Failure

From: <operationsengineer1(at)yahoo(dot)com>
To: operationsengineer1(at)yahoo(dot)com, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Copy Failure
Date: 2005-08-30 22:27:15
Message-ID: 20050830222715.91175.qmail@web33314.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


--- operationsengineer1(at)yahoo(dot)com wrote:

>
>
> --- Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> > <operationsengineer1(at)yahoo(dot)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

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Bruce Momjian 2005-08-30 22:57:14 Re: Copy function syntax on 8.1
Previous Message Tom Lane 2005-08-30 21:40:45 Re: Disabling Trigger