Re: Bulkloading using COPY - ignore duplicates?

From: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jim Buttafuoco <jim(at)buttafuoco(dot)net>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bulkloading using COPY - ignore duplicates?
Date: 2001-12-14 11:30:17
Message-ID: 15385.58057.662013.530035@elsick.csl.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut writes:
> I think allowing this feature would open up a world of new
> dangerous ideas, such as ignoring check contraints or foreign keys
> or magically massaging other tables so that the foreign keys are
> satisfied, or ignoring default values, or whatever. The next step
> would then be allowing the same optimizations in INSERT. I feel
> COPY should load the data and that's it. If you don't like the
> data you have then you have to fix it first.

I agree that PostgreSQL's checks during COPY are a bonus and I
wouldn't dream of not having them. Many database systems provide a
fast bulkload by ignoring these constraits and cross references -
that's a tricky/horrid situation.

However I suppose the question is should such 'invalid data' abort the
transaction, it seems a bit drastic...

I suppose i'm not really after a IGNORE DUPLICATES option, but rather
a CONTINUE ON ERROR kind of thing.

Regards, Lee.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Luis Amigo 2001-12-14 12:32:11 Re: can someone explain that?
Previous Message Karel Zak 2001-12-14 11:01:34 deadline date for .po translators