Try a
Begin
... block to watch ...
Exception
When error_code then
... What to do ...
End;
block, it works to me, it is better explained in the manual..
----- Original Message -----
From: "Richard Huxton" <dev@archonet.com>
To: "Shaun Clements" <ShaunC@relyant.co.za>
Cc: <pgsql-general@postgresql.org>
Sent: Wednesday, March 30, 2005 11:44 AM
Subject: Re: [GENERAL] Catch of ERROR in PLPGSQL
> Shaun Clements wrote:
>> Hi All
>> Does anyone know if Postgres supports Catching of errors, from an
>> EXECUTE,
>> for Procedural Language Postgres.
>
> In version 8, yes. See the manuals (35.7.5. Trapping Errors) for details.
>
> --
> Richard Huxton
> Archonet Ltd
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>