Josh Berkus wrote:

>Dennis,
>
>  
>
>>      EXCEPTION WHEN unique_violation THEN
>>    
>>
>
>I seem to remember that catching an exception in a PL/pgSQL procedure was a 
>large performance cost.   It'd be better to do UPDATE ... IF NOT FOUND.
>
>  
>
Actually, he was doing an implicit UPDATE IF NOT FOUND in that he was doing:

UPDATE

IF found THEN return;

INSERT
EXCEPT
...

So really, the exception should never be triggered.
John
=:->

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to