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

RE: Patch for JDBC driver not returning correct # of records deleted

From: Peter Mount <petermount(at)maidstone(dot)gov(dot)uk>
To: "'Bruce Momjian'" <pgman(at)candle(dot)pha(dot)pa(dot)us>, Barry Lind <barry(at)xythos(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: RE: Patch for JDBC driver not returning correct # of records deleted
Date: 2000-09-12 06:53:41
Message-ID: 1B3D5E532D18D311861A00600865478CF1B3A2@exchange1.nt.maidstone.gov.uk (view raw or flat)
Thread:
Lists: pgsql-patches
I've already got this one in ready to commit (it was way too late last night
:) )...

-- 
Peter Mount
Enterprise Support Officer, Maidstone Borough Council
Email: petermount(at)maidstone(dot)gov(dot)uk
WWW: http://www.maidstone.gov.uk
All views expressed within this email are not the views of Maidstone Borough
Council


-----Original Message-----
From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us]
Sent: Tuesday, September 12, 2000 5:11 AM
To: Barry Lind
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: [PATCHES] Patch for JDBC driver not returning correct # of
records deleted


> 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
> 

If I look at the code in the current CVS tree, I see a test only for
INSERT, and not INSERT and UPDATE.  Can you supply a context diff that I
can apply?  That would help me be sure I am changing the right lines. 
Thanks.



-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Responses

pgsql-patches by date

Next:From: Peter MountDate: 2000-09-12 06:56:19
Subject: RE: [PATCHES] JDBC Patch
Previous:From: Bruce MomjianDate: 2000-09-12 05:38:39
Subject: Re: JDBC: redundant String allocations removed

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