Re: Transaction in function problem

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

Rory,

> 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.

--
-Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Rory Campbell-Lange 2003-05-27 18:59:02 Re: Transaction in function problem
Previous Message Chad Thompson 2003-05-27 18:35:29 pg_dumpall and restore