Re: Stored Procedures - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Stored Procedures
Date
Msg-id 20040921190810.GA7160@dcc.uchile.cl
Whole thread Raw
In response to Stored Procedures  ("Kent Anderson" <kenta@ezyield.com>)
List pgsql-general
On Tue, Sep 21, 2004 at 11:11:33AM -0700, Chris Travers wrote:
> Alvaro Herrera wrote:
>
> >There's only one transaction (whether it's an explicit transaction block
> >or an implicit one), and the query that invokes the stored procedure is
> >already running inside it.  So the stored procedure always has the
> >safety of it, and it can't get out (except by raising an error and
> >aborting the whole thing).  The transaction can only be committed
> >_after_ the stored procedure has finished succesfully.
>
> I am assuming that save points would still work as advertised in stored
> procedures....

Not at all.  What you actually use is exception blocks.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"El sentido de las cosas no viene de las cosas, sino de
las inteligencias que las aplican a sus problemas diarios
en busca del progreso." (Ernesto Hernández-Novich)


pgsql-general by date:

Previous
From: Reynard Hilman
Date:
Subject: Re: abnormal data grow
Next
From: Josué Maldonado
Date:
Subject: Set return function with union all