Re: Catch of ERROR in PLPGSQL - Mailing list pgsql-general

From Cristian Prieto
Subject Re: Catch of ERROR in PLPGSQL
Date
Msg-id 01e501c53550$f5fcac00$6e00a8c0@gt.ClickDiario.local
Whole thread Raw
In response to Catch of ERROR in PLPGSQL  (Shaun Clements <ShaunC@relyant.co.za>)
List pgsql-general
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)
>



pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Catch of ERROR in PLPGSQL
Next
From: Peter Eisentraut
Date:
Subject: Re: limited disk space