From: Ludwig Lim <lud_nowhere_man@yahoo.com>
To: PostgreSQL Mailing List <pgsql-sql@postgresql.org>
Subject: A PL/PgSQL Question
Date: Fri, 13 Dec 2002 09:50:23 -0800 (PST)
Message-ID: <20021213175023.75148.qmail@web80302.mail.yahoo.com> (raw)
Hi:
I have the following PL/PgSQL code blocks:
a) IF (condition) THEN
RAISE EXCEPTION ''Cannot Insert'';
END IF;
b) IF (condition) THEN
RAISE NOTICE ''Cannot Insert'';
RETURN NULL;
END IF;
What is the difference between the first and second
chunk PL/PgSQL INSERT/UPDATE trigger function code
aside from the fact that first scenario will result in
an "ABORT" state?
Are there any instances where a NOTICE and a RETURN
NULL statement is a much better than a RAISE EXCEPTION
statement?
Thank you very much,
ludwig lim
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
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: lud_nowhere_man@yahoo.com
Subject: Re: A PL/PgSQL Question
In-Reply-To: <20021213175023.75148.qmail@web80302.mail.yahoo.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