Re: error handling - Mailing list pgsql-novice

From Verena Ruff
Subject Re: error handling
Date
Msg-id 4461E610.7070108@triosolutions.at
Whole thread Raw
In response to Re: error handling  (Sean Davis <sdavis2@mail.nih.gov>)
Responses Re: error handling
List pgsql-novice
Hi,

Sean Davis schrieb:
> Probably the simplest way to do this is to load the data into a temporary
> table without the unique constraint then use SQL to insert a "clean" version
> into the new table.  Alternatively, you could use savepoints.  If an insert
> fails, just rollback to that savepoint.  If it succeeds, commit that
> savepoint.
>
But isn't that more overhead than using the trigger? And while inserting
into the clean table, I would have to test if the value is existing or
not. I don't see the advantage of this compared to the script which was
posted a few weeks ago.

Regards,
Verena

pgsql-novice by date:

Previous
From: Sean Davis
Date:
Subject: Re: index not used with inherited tables
Next
From: "Daniel T. Staal"
Date:
Subject: Vacuuming static tables.