From: Josh Berkus <josh@agliodbs.com>
To: Eaglet <Aquil8@infinito.it>
To: pgsql-sql@postgresql.org
Subject: Re: handling exceptions, really not simple... :-((
Date: Thu, 15 Nov 2001 08:52:05 -0800
Message-ID: <web-506730@davinci.ethosmedia.com> (raw)
In-Reply-To: <9stld9$1cloc$1@news02.it.net>
Eaglet,
In the future, please refrain from cross-posting on multiple PostgreSQL
lists. We get enough traffic without seeing the same message on 3
lists.
> The goal to achieve is to trap every kind of execution errors without
> trying
> to prevent their occurrence.
> In any case, I usually can't be sure the function (F_EXT) works
> correcty: an
> exception could be lanched by an internal function (F_INT), I
> couldn't know
> to estabilish what happens and where ...
Unfortunately, PG/plSQL does not currently support any programmed
exception handling. If an exception occurs in a pgplsql function, it
rolls back the entire function, including rolling back any calling
functions on a cascading basis.
This is partly due, as I understand it, to Postgres' lack of support for
nested transactions. Hopefully one of the Core Team will speak up with
the prognosis on fixing this particular issue. Right now, projects
needing sophisticated exception handling are being done in middleware
languages that support it, such as Java and Perl.
See Oracle <--> Postgres porting guides at
http://techdocs.postgresql.org/
-Josh
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
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: josh@agliodbs.com, Aquil8@infinito.it
Subject: Re: handling exceptions, really not simple... :-((
In-Reply-To: <web-506730@davinci.ethosmedia.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