Re: transaction in plpgsql

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: Joseph Syjuco <joseph(at)asti(dot)dost(dot)gov(dot)ph>, postgres <pgsql-sql(at)postgresql(dot)org>
Subject: Re: transaction in plpgsql
Date: 2002-06-28 06:08:51
Message-ID: web-1560044@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Joe,

> how can i implement transactions inside my plpgsql functions

You can't.

Each PL/pgSQL function is automatically treated as a single transaction
by Postgres. As such, the entire function either succeeds or fails.

To manage a transaction *inside* the PL/pgSQL function, Postgres would
have to support nested transactions ... which we currently don't.
Nested transactions and MVCC are somewhat of a tangle to reconcile,
and we don't expect a solution until Postgres 8.0 (if then).

-Josh Berkus

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message David BOURIAUD 2002-06-28 06:38:34 Re: graphical interface - admin
Previous Message q u a d r a 2002-06-28 03:58:39 time difference