From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jan Wieck <janwieck(at)yahoo(dot)com>, Joep deVocht <joep(at)masktools(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Small question |
Date: | 2002-03-22 19:52:29 |
Message-ID: | 200203221952.g2MJqTf02989@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane wrote:
> Jan Wieck <janwieck(at)yahoo(dot)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...
We only need one bit to pass the transaction status back to the client.
Shame we can't throw that bit in there somewhere.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Emberson | 2002-03-22 21:17:42 | sql-update: WHERE CURRENT OF cursor |
Previous Message | Jan Wieck | 2002-03-22 19:30:00 | Re: Small question |