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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: 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 04:11:07
Message-ID: 200009120411.AAA08587@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
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
>

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

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2000-09-12 04:12:41 Re: Update tests/regress/resultmap for IRIX 6
Previous Message Mark Hollomon 2000-09-11 14:09:31 ALTER TABLE OWNER