plpgsql

From: Jie Liang <jliang(at)ipinc(dot)com>
To:
Cc: pgsql-sql(at)postgresql(dot)org
Subject: plpgsql
Date: 2000-12-08 20:51:30
Message-ID: 3A3149D2.4E59DA8E@ipinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)ipinc(dot)com
www.ipinc.com

In response to

  • currval at 2000-10-02 04:56:20 from Craig May

Responses

  • Re: plpgsql at 2000-12-12 06:42:49 from Kovacs Zoltan Sandor

Browse pgsql-sql by date

  From Date Subject
Next Message W. van den Akker 2000-12-08 22:30:00 How to...
Previous Message Stephan Szabo 2000-12-08 17:23:08 Re: FOREIGN KEY errors.