Re: Does copy abort on a failed insertion?

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Reid Thompson <Reid(dot)Thompson(at)ateb(dot)com>
Cc: Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Does copy abort on a failed insertion?
Date: 2005-09-29 19:52:02
Message-ID: 1128023522.29347.58.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2005-09-29 at 14:28, Reid Thompson wrote:
> If i have a pg_dump that is using COPY, and midway through the copy an
> insert fails due to a unique constraint, will the COPY continue with the
> rest of the records, or will it abort? If it aborts, will it perform a
> rollback on the inserts up to that point?

Copies are all or nothing. Either the whole set gets inserted or none
of it.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vivek Khera 2005-09-29 20:45:16 Re: DBI/DBD::Pg mem. use goes exponential
Previous Message A. Kretschmer 2005-09-29 19:46:58 Re: pl/pgsql function debugging