Mike Mascari <mascarm@mascari.com> writes:
> So would it be
> possible to modify PQFinish() to examine whether autocommit = true,
> and if so, issue a commit before disconnect, else just disconnect?
That's just a slightly different way of shooting yourself in the foot.
What's the difference whether it's libpq or the backend that pulls
the trigger? It's still not an explicit decision by the client.
I guess I do not understand the motivation for this proposal.
As I see it, the idea is that the client does not want an autocommit,
so he sets an option saying "no autocommit, hold transaction open until
I explicitly commit". Why exactly would such a client think that an
autocommit on disconnect is a good idea? The whole POINT is to require
an explicit commit command. (ie, the client wants the gun in his own
hand, no delegation of the trigger decision, thank you very much)
ISTM people who like autocommit will be using our existing behavior.
regards, tom lane