Skip site navigation (1) Skip section navigation (2)

Re: Error handling in plperl and pltcl

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Hallgren <thhal(at)mailblocks(dot)com>
Cc: Richard Huxton <dev(at)archonet(dot)com>,Jan Wieck <JanWieck(at)Yahoo(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Error handling in plperl and pltcl
Date: 2004-11-30 20:33:23
Message-ID: 24061.1101846803@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Thomas Hallgren <thhal(at)mailblocks(dot)com> writes:
>  From your statement it sounds like you want to use the subtransactions 
> solely in a hidden mechanism and completely remove the ability to use 
> them from the function developer. Is that a correct interpretation?

No; I would like to develop the ability to specify savepoints in pltcl
and plperl, so that already-executed SPI commands can be rolled back at
need.  But that is a feature for later --- it's way too late to think
about it for 8.0.  Moreover, having that will not remove the requirement
for the state after catching a SPI error to be sane.

The fundamental point you are missing, IMHO, is that a savepoint is a
mechanism for rolling back *already executed* SPI commands when the
function author wishes that to happen.  A failure in an individual
command should not leave the function in a broken state.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: James William PyeDate: 2004-11-30 21:02:19
Subject: Re: Error handling in plperl and pltcl
Previous:From: Bruce MomjianDate: 2004-11-30 19:34:06
Subject: Re: multiline CSV fields

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group