Re: COPY error

From: "Nupur Pande" <npande(at)vt(dot)edu>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: <pgsql-cygwin(at)postgresql(dot)org>
Subject: Re: COPY error
Date: 2003-10-30 19:58:48
Message-ID: 004001c39f20$3bf11110$6500a8c0@RANIKHET
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin

Sorry about the last email. I made a dumb mistake. I'm still getting the
copy error though
ERROR: copy: line 1520, Extra data after last expected column
ERROR: copy: line 1520, Extra data after last expected column

Also, line 1520 is not the last line in the file, it's in the middle. Does
postgresql have a limit on the number of rows in a table? What did you mean
by changing the file to newline-only?

Thanks again..

----- Original Message -----
From: "Nupur Pande" <npande(at)vt(dot)edu>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: <pgsql-cygwin(at)postgresql(dot)org>
Sent: Thursday, October 30, 2003 2:53 PM
Subject: Re: [CYGWIN] COPY error

> Hi,
> I'm using 7.3.2.. I tried to find 7.4beta5 but couldn't find it on any of
> the cywin mirror sites, only on postgresql.org. Also, I ran d2u again on
the
> file to generate a new text file and now I get a new error when I try to
> copy the data to the database:
>
> ERROR: parser: parse error at or near "'/home/Nupur/Pine2_Results'" at
> character 20
> ERROR: parser: parse error at or near "'/home/Nupur/Pine2_Results'" at
> character 20
>
> I haven't changed anything in the file from the previous time except
running
> d2u on it again..
>
> Also, I'm not sure how to change the file to newline-only.
>
> Thanks for your help,
> Nupur
>
> ----- Original Message -----
> From: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
> To: "Nupur Pande" <npande(at)vt(dot)edu>
> Cc: <pgsql-cygwin(at)postgresql(dot)org>
> Sent: Thursday, October 30, 2003 1:26 PM
> Subject: Re: [CYGWIN] COPY error
>
>
> >
> > My guess is that the file is carriage-return/newline terminated. Change
> > it to newline-only. This is fixed in 7.4beta5.
> >
>
> --------------------------------------------------------------------------
> -
> >
> > Nupur Pande wrote:
> > > Hi,
> > > I'm trying to copy data from an excel file into a postgres table. I
> saved
> > > the file in .txt format (tab delimited) from Excel (running on Windows
> XP
> > > machine) and then ran the d2u utility on the .txt file to convert it
> into
> > > unix format on cygwin. The command I executed was COPY [table_name]
from
> > > [full path of file name].
> > > I get the following error message:
> > > ERROR: copy: line 1520, Extra data after last expected column
> > > ERROR: copy: line 1520, Extra data after last expected column
> > >
> > > Could someone please tell me what I did wrong? I checked the excel
table
> and
> > > I can't see any extra information on that line.
> > >
> > > Thanks a lot..
> > > Nupur
> > >
> > >
> > > ---------------------------(end of
broadcast)---------------------------
> > > TIP 6: Have you searched our list archives?
> > >
> > > http://archives.postgresql.org
> > >
> >
> > --
> > Bruce Momjian | http://candle.pha.pa.us
> > pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
> > + If your life is a hard drive, | 13 Roberts Road
> > + Christ can be your backup. | Newtown Square, Pennsylvania
> 19073
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> > message can get through to the mailing list cleanly
>

Browse pgsql-cygwin by date

  From Date Subject
Next Message Cornelia Boenigk 2003-10-30 21:08:40 Re: installation and configuration of postgresql
Previous Message Nupur Pande 2003-10-30 19:53:47 Re: COPY error