Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: autocommit and stored procedures



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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group