Re: Bulkloading using COPY - ignore duplicates?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Vadim Mikheev <vmikheev(at)sectorbase(dot)com>
Cc: Daniel Kalchev <daniel(at)digsys(dot)bg>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Lee Kindness <lkindness(at)csl(dot)co(dot)uk>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Jim Buttafuoco <jim(at)buttafuoco(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bulkloading using COPY - ignore duplicates?
Date: 2002-01-04 18:16:46
Message-ID: 200201041816.g04IGkC06781@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Vadim Mikheev wrote:
> > Now, how about the same functionality for
> >
> > INSERT into table1 SELECT * from table2 ... WITH ERRORS;
> >
> > Should allow the insert to complete, even if table1 has unique indexes and
> we
> > try to insert duplicate rows. Might save LOTS of time in bulkloading
> scripts
> > not having to do single INSERTs.
>
> 1. I prefer Oracle' (and others, I believe) way - put statement(s) in PL
> block and define
> for what exceptions (errors) what actions should be taken (ie IGNORE for
> NON_UNIQ_KEY
> error, etc).

Added to TODO:

* Allow command blocks that can ignore certain types of errors

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-01-04 18:22:41 Re: Syntax changes in 7.2
Previous Message Kaare Rasmussen 2002-01-04 17:07:39 Re: Updated TODO item