|
Home > Archive > PostgreSQL Discussion > September 2005 > Does copy abort on a failed insertion?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Does copy abort on a failed insertion?
|
|
| Reid Thompson 2005-09-29, 8:23 pm |
| 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?
thanks,
reid
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly
| |
| Scott Marlowe 2005-09-29, 8:23 pm |
| 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.
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
|
|
|
|
|