Re: how to use SAVEPOINT in stored function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Frank(dot)Motzkat(at)ic3s(dot)de
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: how to use SAVEPOINT in stored function
Date: 2005-12-05 16:15:54
Message-ID: 240.1133799354@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Frank(dot)Motzkat(at)ic3s(dot)de writes:
> I would like using savepoints in my stored functions but I always get the
> error
> ERROR: SPI_execute_plan failed executing query "SAVEPOINT my_savepoint":

In plpgsql, you're supposed to use exception blocks instead. See
http://www.postgresql.org/docs/8.1/static/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Volkan YAZICI 2005-12-05 16:35:55 Re: how to use SAVEPOINT in stored function
Previous Message Frank.Motzkat 2005-12-05 15:46:39 how to use SAVEPOINT in stored function