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

Patch for JDBC driver not returning correct # of records deleted

From: Barry Lind <barry(at)xythos(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Patch for JDBC driver not returning correct # of records deleted
Date: 2000-08-15 18:14:22
Message-ID: 3999887E.751C2519@xythos.com (view raw or flat)
Thread:
Lists: pgsql-patches
I had a problem with the JDBC driver (in 7.0.2) always returning 1 as
the row count for deletes (whether the actual delete affected 0 or more
rows).  In looking through the source this appears to be a simple one
line code fix.

Change line 370 in src/interfaces/jdbc/org/postgresql/Connection.java
v1.1 from:
                                if(recv_status.startsWith("INSERT") ||
recv_status.startsWith("UPDATE")) {
to:
                                if(recv_status.startsWith("INSERT") ||
recv_status.startsWith("UPDATE") || recv_status.startsWith("DELETE")) {

thanks,
--Barry

Responses

pgsql-patches by date

Next:From: Pete FormanDate: 2000-08-18 09:51:03
Subject: Update tests/regress/resultmap for IRIX 6
Previous:From: Karel ZakDate: 2000-08-08 07:55:34
Subject: Re: to_char's ISO week

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group