Re: PL/pgSQL equivalent to PQtransactionStatus?

From: Richard Huxton <dev(at)archonet(dot)com>
To: Christophe <xof(at)thebuild(dot)com>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: PL/pgSQL equivalent to PQtransactionStatus?
Date: 2008-07-31 19:09:50
Message-ID: 48920DFE.1010909@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Christophe wrote:
>
> On Jul 31, 2008, at 11:12 AM, Richard Huxton wrote:
>> A pl/pgsql function *always* executes within a transaction.
>
> Indeed so. What I'm looking for is a way of detecting if a transaction
> block has been opened (i.e., we're within a BEGIN).

There is no difference between a transaction explicitly started with
BEGIN...COMMIT and one wrapping a single statement.

What were you planning to do differently if a BEGIN was issued?

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mike Gould 2008-07-31 19:28:14 Using PostGres general distribution
Previous Message Christophe 2008-07-31 19:03:33 Re: PL/pgSQL equivalent to PQtransactionStatus?