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" <[email protected]>
To: "Shaun Clements" <[EMAIL PROTECTED]>
Cc: <[email protected]>
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 [EMAIL PROTECTED])
---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
