Re: Small question

From: Jan Wieck <janwieck(at)yahoo(dot)com>
To: Joep deVocht <joep(at)masktools(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Small question
Date: 2002-03-22 18:07:02
Message-ID: 200203221807.g2MI72E15935@saturn.janwieck.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joep deVocht wrote:
>
> Hi,
>
> Is there a way to determine whether a transaction
> is started and not ended yet? I.e. is it possible to
> check whether a "begin"was issued but the corresponding
> "commit/end" wasn't yet?
>
> I'm using the c++ interface for Postgres7.1.
> (But I hope the answer is independent of that)
>
> Many thanx in advance,

This question came from time to time, and many interfaces
seem to try to keep track of the actual transaction status in
order to emulate autocommit off behaviour and such.

The only one who's really able to tell the current
transaction state is the backend.

I think it's time to add a little boolean function, that
actually returns IsTransactionBlock(), and have a libpq side
wrapper around PQfn() calling it.

Any other opinions?

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2002-03-22 18:11:22 Re: Referential Integrity problem
Previous Message mark 2002-03-22 17:49:44 Re: ODBC problem