Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group