Re: autocommit and stored procedures

From: Mark Lewis <mark(dot)lewis(at)mir3(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: roehm(at)it(dot)usyd(dot)edu(dot)au, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: autocommit and stored procedures
Date: 2007-08-15 14:25:44
Message-ID: 1187187944.23831.28.camel@archimedes
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Thu, 2007-08-16 at 02:06 +1200, Oliver Jowett wrote:
> roehm(at)it(dot)usyd(dot)edu(dot)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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message roehm 2007-08-16 07:21:45 Re: autocommit and stored procedures
Previous Message Oliver Jowett 2007-08-15 14:06:27 Re: autocommit and stored procedures