pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jie Liang <jliang@ipinc.com>
Cc: pgsql-sql@postgresql.org
Subject: plpgsql
Date: Fri, 08 Dec 2000 12:51:30 -0800
Message-ID: <3A3149D2.4E59DA8E@ipinc.com> (raw)
References: <20001002045414.A6334@s2.enthdimension.com.au>
	<20001002045620.B6334@s2.enthdimension.com.au>

>

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






view thread (23+ messages)  latest in thread

Message-ID: <3A3149D2.4E59DA8E@ipinc.com>
Permalink:  ../3A3149D2.4E59DA8E@ipinc.com/
Also on:    postgresql.org/message-id/3A3149D2.4E59DA8E@ipinc.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jliang@ipinc.com
  Subject: Re: plpgsql
  In-Reply-To: <3A3149D2.4E59DA8E@ipinc.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox