Re: use SAVEPOINT function

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Ying Lu <ying_lu(at)cs(dot)concordia(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: use SAVEPOINT function
Date: 2005-04-14 20:21:00
Message-ID: 20050414202100.GC2492@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Apr 14, 2005 at 04:10:18PM -0400, Ying Lu wrote:

> I'd like to know is it possible to use "SAVEPOINT" in a function? In the
> following example, I got an error when calling this function:

No; exceptions in plpgsql are implemented internally using savepoints,
so the function will automatically roll back the whole "begin ... end"
block (remember you can nest blocks if needed.)

--
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
"Java is clearly an example of a money oriented programming" (A. Stepanov)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2005-04-14 20:25:17 Re: Help with process list II
Previous Message Ying Lu 2005-04-14 20:17:58 Re: use SAVEPOINT function