pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Joseph Syjuco <joseph@asti.dost.gov.ph>
To: postgres <pgsql-sql@postgresql.org>
Subject: Re: transaction in plpgsql
Date: Thu, 27 Jun 2002 23:08:51 -0700
Message-ID: <web-1560044@davinci.ethosmedia.com> (raw)
In-Reply-To: <1025283488.13783.6.camel@Askr>

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





view thread (4+ messages)  latest in thread

Message-ID: <web-1560044@davinci.ethosmedia.com>
Permalink:  ../web-1560044@davinci.ethosmedia.com/
Also on:    postgresql.org/message-id/web-1560044@davinci.ethosmedia.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: josh@agliodbs.com, joseph@asti.dost.gov.ph
  Subject: Re: transaction in plpgsql
  In-Reply-To: <web-1560044@davinci.ethosmedia.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox