Skip site navigation (1) Skip section navigation (2)

Re: error handling

From: Verena Ruff <lists(at)triosolutions(dot)at>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: error handling
Date: 2006-05-10 13:35:06
Message-ID: 4461EC0A.9060001@triosolutions.at (view raw or flat)
Thread:
Lists: pgsql-novice
Hello,

sorry for answering so late, ...
> I do not know if there is an specific error handler built in postgresql (besides error-codes).
>
> If you break the unique constraint an error will be thrown. A
> workaround may be to launch a trigger BEFORE the insertion and do whatever is necessary within the trigger.
>   
This is possibillity I was thinking of, too. But if there are many 
inserts and (probably) only a few of them would break the unique 
constraint, there would be a great overhead. This was what I'd like to 
avoid with a custom error handler.

Regards,
Verena



Responses

pgsql-novice by date

Next:From: Sean DavisDate: 2006-05-10 14:04:14
Subject: Re: error handling
Previous:From: Verena RuffDate: 2006-05-10 13:09:36
Subject: Re: error handling

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group