Re: Small question - Mailing list pgsql-general

From Jan Wieck
Subject Re: Small question
Date
Msg-id 200203221930.g2MJU0316307@saturn.janwieck.net
Whole thread Raw
In response to Re: Small question  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane wrote:
> Jan Wieck <janwieck@yahoo.com> writes:
> >> It seems like it might be possible for libpq (or other clients) to keep
> >> track of the transaction state by paying attention to BEGIN, COMMIT,
> >> ABORT command-completion tags and ERROR messages, but I haven't worked
> >> through the details.
>
> >         PQexec(c, "BEGIN; SELECT now()");
>
> >     Will there even be a BEGIN command tag sent?
>
> Yes.  PQexec doesn't tell you about it, but one comes through.  (This
> is certainly true in current sources, and I believe has always been true.)
>
> It'd be nastier if we allowed functions to change the transaction-block
> state, but we don't...

    Well,  then  we don't need a protocol change. Libpq and other
    interface libraries could keep track of it without.


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: Bruce Momjian
Date:
Subject: Re: Small question
Next
From: Richard Emberson
Date:
Subject: sql-update: WHERE CURRENT OF cursor