plpgsql - Mailing list pgsql-sql

From Jie Liang
Subject plpgsql
Date
Msg-id 3A3149D2.4E59DA8E@ipinc.com
Whole thread Raw
In response to currval  (Craig May <craig.may@s2.enthdimension.com.au>)
Responses Re: plpgsql
List pgsql-sql
>

Hi, there,

Is there any way to handle exception ( such as cannot insert duplicate key on
a unique index) in
plpgsql function?

I don't want it abort whole transaction instead I want to do something else if
it happened,
but I don't want to use a select stmt first to waste the time.

In Orcale, in plsql we can say,
declare
begin
do something
exception
do something else
end;

How to this exception section in plpgsql????






--
Jie LIANG

Internet Products Inc.

10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873

jliang@ipinc.com
www.ipinc.com





pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: FOREIGN KEY errors.
Next
From: "W. van den Akker"
Date:
Subject: How to...