Re: Transaction in function problem

From: Rory Campbell-Lange <rory(at)campbell-lange(dot)net>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Postgresql Novice List <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Transaction in function problem
Date: 2003-05-27 18:59:02
Message-ID: 20030527185902.GA2958@campbell-lange.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi Josh

If it is an implied transaction, can one use a rollback in the body of
the function?

On 27/05/03, Josh Berkus (josh(at)agliodbs(dot)com) wrote:

> > I don't appear to be able to use transactions in functions. Needless to
> > say, transactions work in psql. The function below works if I take the
> > TRANSACTION bits out. Help much appreciated!
>
> That is correct. Functions include an implied transaction in PostgreSQL,
> unless they are part of a larger transaction. Postgres does not currently
> support "nested" transactions, so any attempt to use them inside a function
> will fail.
>
> It's on the "TODO" list.

Thanks
Rory

--
Rory Campbell-Lange
<rory(at)campbell-lange(dot)net>
<www.campbell-lange.net>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Sugrue, Sean 2003-05-27 19:07:52 PHP vs Cold Fusion vs Zope
Previous Message Josh Berkus 2003-05-27 18:48:50 Re: Transaction in function problem