Re: Batch Processing - Autocommit

From: Barry Lind <blind(at)xythos(dot)com>
To: Ron <rstpierre(at)syscor(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Batch Processing - Autocommit
Date: 2003-09-17 23:37:56
Message-ID: 3F68F054.4050803@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Are you using the 7.4 version of the jdbc driver? It sound's like you
are using the 7.3 driver against a 7.4 database.

thanks,
--Barry

Ron wrote:
> 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
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message sc0698 2003-09-18 03:38:44 Re: Stored Procedure returns a ResultSet
Previous Message Oliver Jowett 2003-09-17 22:26:47 Re: Specification of "/" in the host name (for Unix socket support)