From: Mark Lewis <mark.lewis@mir3.com>
To: Oliver Jowett <oliver@opencloud.com>
Cc: roehm@it.usyd.edu.au
Cc: pgsql-jdbc@postgresql.org
Subject: Re: autocommit and stored procedures
Date: Wed, 15 Aug 2007 07:25:44 -0700
Message-ID: <1187187944.23831.28.camel@archimedes> (raw)
In-Reply-To: <46C30863.3080709@opencloud.com>
References: <D3A9FBB1-6304-4B25-878D-E0F1C06280BA@it.usyd.edu.au>
<46C30863.3080709@opencloud.com>
On Thu, 2007-08-16 at 02:06 +1200, Oliver Jowett wrote:
> roehm@it.usyd.edu.au wrote:
>
> > Which command granularity does the JDBC driver's autocommit have?
> > Does it commit after each client-side JDBC statement, or does it commit
> > each individual SQL statement on the server-side?
>
> It effectively commits after each client-side JDBC statement execution,
> even if you provide multiple semicolon-separated queries in a single
> statement. At the protocol level the driver converts a single JDBC
> statement into one or more groups of Parse/Bind/Execute messages,
> followed by a single Sync. You can see this if you look at the debugging
> produced with loglevel=2. Also see
> http://www.postgresql.org/docs/8.2/static/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY
Did this change with v3 protocol? I'm not positive, but I remember
thinking that it used to commit each statement individually quite a
while back, but that would have been in the days of the v2 protocol.
If that's the case, then maybe using v2 protocol would suffice for
executing multiple statements at a time with a single auto-commit?
But yeah, none of this really seems to apply to the original poster's
question anyway.
-- Mark Lewis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: mark.lewis@mir3.com, oliver@opencloud.com, roehm@it.usyd.edu.au
Subject: Re: autocommit and stored procedures
In-Reply-To: <1187187944.23831.28.camel@archimedes>
References: <D3A9FBB1-6304-4B25-878D-E0F1C06280BA@it.usyd.edu.au> <46C30863.3080709@opencloud.com> <1187187944.23831.28.camel@archimedes>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox