Re: Batch Processing - Autocommit - Mailing list pgsql-jdbc

From Ron
Subject Re: Batch Processing - Autocommit
Date
Msg-id 3F68CD21.7060601@syscor.com
Whole thread Raw
In response to Re: Batch Processing - Autocommit  (Kris Jurka <books@ejurka.com>)
Responses Re: Batch Processing - Autocommit
List pgsql-jdbc
Kris Jurka wrote:

>On Wed, 17 Sep 2003, Ron wrote:
>
>
>>I am running postgres 7.4 and want the database to process a large
>>number of transactions at once from a java application. I tried to set
>>autocommit = false, but as of postgres 7.4 that is not possible.
>>
>>    java.sql.SQLException: ERROR:  SET AUTOCOMMIT TO OFF is no longer
>>supported
>>
>>
>
>You need to use the Connection's setAutoCommit method instead of issuing
>the above SQL directly.  Auto commit support has been moved from the
>backend into the various client libraries in 7.4.
>
>Kris Jurka
>
>
Sorry I didn't make it clearer, but I was trying to set it in the java app:
    conn = DriverManager.getConnection(
            "jdbc:postgresql://imo:5432/lytic",
            "postgres",
            "postgres");
        stmt = conn.createStatement();
        conn.setAutoCommit(false);

 The error message above was generated when I tried to run the java code.

Ron


pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Batch Processing - Autocommit
Next
From: Oliver Jowett
Date:
Subject: Re: Specification of "/" in the host name (for Unix socket support)