Re: JDBC gripe list (the autocommit subthread)

From: "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JDBC gripe list (the autocommit subthread)
Date: 2011-03-31 23:21:10
Message-ID: FC2AAAA8-A419-4305-88BA-A5C14AC6CAD8@themactionfaction.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


On Mar 31, 2011, at 7:06 PM, Kevin Grittner wrote:

> Oliver Jowett <oliver(at)opencloud(dot)com> wrote:
>
>> (b) the current behavior is consistent with how multiple statement
>> execution works elsewhere in the driver, where if you execute
>> "SELECT a; SELECT b" as a statement with autocommit=true then the
>> two queries run in a single transaction;
>
> I did not know that. Is that required by spec?
>
> It definitely doesn't happen in psql:

psql includes an SQL lexer which breaks up the statements. Weird, but true!

http://git.postgresql.org/gitweb?p=postgresql.git;a=blob;f=src/bin/psql/psqlscan.l;h=3575f91a61477f09c4939e53fb1495d763485e86;hb=HEAD#l1170

Note that the v2 backend protocol does not support multiple queries per statement.

Cheers,
M

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2011-03-31 23:29:52 Re: JDBC gripe list (the autocommit subthread)
Previous Message Oliver Jowett 2011-03-31 23:15:45 Re: JDBC gripe list (the autocommit subthread)