any way to check if a transaction is active?

From: Mario Weilguni <mweilguni(at)sime(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: any way to check if a transaction is active?
Date: 2002-08-08 06:57:06
Message-ID: 200208080857.06392.mweilguni@sime.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to find some method to detect wether a real transaction is in progress. With "real" I mean a transaction explicitly started with "begin", not the
auto-transactions postgres puts around single statements. Is there a function that can be used for this? It's ok for me to write a extension function in C if this is necessary, but I've no
clue where to start?

The reason why I need this is this one:
* I use a database wrapper in PHP to stay compatible with Oracle
* whenever I issue a rollback without any prior transaction, the apache error log will have a line
NOTICE: ROLLBACK: no transaction in progress
ROLLBACK

This makes the error log unreadable, so I'm trying to get rid of this. Any idea how?

Best regards,
Mario Weilguni

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Seidman 2002-08-08 07:24:29 increasing FUNC_MAX_ARGS insufficient?
Previous Message Peter Gibbs 2002-08-08 06:56:50 Re: transactions, serial ids, and JDBC