Re: When running with autocommit false only the first BEGIN - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: When running with autocommit false only the first BEGIN
Date
Msg-id 26957.1101224889@sss.pgh.pa.us
Whole thread Raw
In response to Re: When running with autocommit false only the first BEGIN  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc
Oliver Jowett <oliver@opencloud.com> writes:
> Dave Cramer wrote:
>> That certainly doesn't seem acceptable. As Barry points out people will
>> really be in the dark when their code doesn't work.

> There's nothing much the driver can do about it other than not using the
> new features of V3. This needs a server-side fix.

Step right up ;-)

> See http://archives.postgresql.org/pgsql-hackers/2004-05/msg01173.php
> for past discussion. I looked at fixing it briefly but didn't have time
> to put together a patch.

I think the code changes would be minimal, the hard part is agreeing on
desirable behavior.  From the point of view of "logging what actually
happened", logging at Execute would make sense; but as Oliver noted in
the above thread, that would lose the ability to log statements with
parse errors, which is not good either.  And what about being able to
see the actual parameters sent in Bind?

Also it would be good to think about a saner behavior for logging
statements executed via SPI (ie plpgsql functions) --- we've been living
with essentially these same problems for years there, and no one's very
happy about it.

            regards, tom lane

pgsql-jdbc by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Strange server error with current 8.0beta driver
Next
From: "Barry Lind"
Date:
Subject: Re: [HACKERS] Strange server error with current 8.0beta driver