Re: New SET/autocommit problem - Mailing list pgsql-hackers

From Sean Chittenden
Subject Re: New SET/autocommit problem
Date
Msg-id 20021022071241.GB62984@perrin.int.nxad.com
Whole thread Raw
In response to Re: New SET/autocommit problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: New SET/autocommit problem
List pgsql-hackers
> >     WARNING:  COMMIT: no transaction in progress
> >     COMMIT
> 
> > The WARNING happens with SHOW and RESET too.  I wonder if we should
> > suppress the WARNING of a COMMIT with no statements when autocommit is
> > off.
> 
> I don't think so; that will make it quite hard to check whether a
> transaction is open.

I've got tons of these warnings in my logs... is there a programmatic
way of determining if the current session is in a transaction?  Unless
I misunderstood the fix and the commit message, I'm pretty sure that
most of my problem has been fixed in CVS with SET's auto-committing if
it's not in a transaction, but now that there are some intricate rules
with regards to starting transactions, I'd love to provide a DBI
interface into a call that returns whether or not we're in a
transaction to prevent millions of these:

NOTICE:  ROLLBACK: no transaction in progress

-sc

-- 
Sean Chittenden


pgsql-hackers by date:

Previous
From: Sean Chittenden
Date:
Subject: Re: v7.3 Branched ...
Next
From: Mark Kirkwood
Date:
Subject: Multiple Key Clustering In Db2 8.1 - Interesting FYI