Re: How to check that I am in transaction inside backend - Mailing list pgsql-hackers

From Christof Petig
Subject Re: How to check that I am in transaction inside backend
Date
Msg-id 3A02D710.447A94C9@wtal.de
Whole thread Raw
In response to How to check that I am in transaction inside backend  (Denis Perchine <dyp@perchine.com>)
List pgsql-hackers
Denis Perchine wrote:

> Hello,
>
> Having some expirience with catching errors with BLOBs, I realised, that it
> is really hard to understand that you forget to enclose BLOB operations in
> transaction...
>
> I would like to add a check for each BLOB operation which will check whether
> we are in transaction, and if not it will issue a notice.
>
> The question is how correctly check that I am in transaction.

simply use IsTransactionBlock()

Christof




pgsql-hackers by date:

Previous
From: "Ross J. Reedstrom"
Date:
Subject: Re: Re: [COMMITTERS] pgsql/contrib/pg_dumpaccounts (Makefile README pg_dumpaccounts.sh)
Next
From: Christof Petig
Date:
Subject: Re: AW: Re: [GENERAL] Query caching