Re: bug fix request

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bug fix request
Date: 2004-11-30 03:43:50
Message-ID: 200411292243.50841.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Monday 29 November 2004 02:58, Christopher Kings-Lynne wrote:
> > Hmm. This error is not coming from "a line of the copy", it is occurring
> > because the COPY command itself fails, and so the server never tells
> > psql to shift into COPY mode. I'm not sure that a reasonable fix for
> > this is possible. As a counterexample, if you misspelled COPY as COPZ,
> > would you expect the software to decide that following lines up to
> > \. should be ignored? If you manually misentered a COPY command and got
> > an error, would you be surprised to have psql ignore everything you
> > typed until you typed \. ? (I can bet we'd get bug reports about that.)
>
> Hmmm...doesn't stop it being annoying, however.
>
> I presumed I was replicating the same problem I get when running SQL
> scripts that insert a few million rows. Basically I start it running,
> then maybe some command before the COPY fails, then it gets to the COPY
> anyway and start barfing millions of lines. Then I have to change my
> terminal settings to record heaps of lines and then try to ctrl-C the
> query before it scrolls too far off, just to find out the line that
> caused the error.
>

Chris, does the problem manifest itself if one of your COPY'd data lines
violates a primary key with existing data in the table ?

--
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-11-30 03:53:35 Re: multiline CSV fields
Previous Message Tom Lane 2004-11-30 03:43:10 Re: Error handling in plperl and pltcl