Re: Small question - Mailing list pgsql-general

From Jan Wieck
Subject Re: Small question
Date
Msg-id 200203221807.g2MI72E15935@saturn.janwieck.net
Whole thread Raw
In response to Small question  (Joep deVocht <joep@masktools.com>)
Responses Re: Small question
List 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@Yahoo.com #



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


pgsql-general by date:

Previous
From: mark
Date:
Subject: Re: ODBC problem
Next
From: Stephan Szabo
Date:
Subject: Re: Referential Integrity problem