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

Notifications in JDBC driver not correct for V3 protocol

From: "Donald Fraser" <demolish(at)cwgsy(dot)net>
To: "[BUGS]" <pgsql-bugs(at)postgresql(dot)org>
Subject: Notifications in JDBC driver not correct for V3 protocol
Date: 2004-08-06 09:31:10
Message-ID: 000b01c47b98$1e0891a0$6364a8c0@DonAcer (view raw or flat)
Thread:
Lists: pgsql-bugs
PostgreSQL version 7.4.3
JDBC Driver
The notifcations for the version 3 protocol are not being decoded at all in the
jdbc driver.

Here is the unix diff. which will correct this bug.

File:
/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/core/QueryExecutor.jav
a

167c167,168
<
statement.addWarning(connection.getEncoding().decode(pgStream.Receive(l_nlen-4)
));
---
> PSQLException notify =
PSQLException.parseServerError(connection.getEncoding().decode(pgStream.Receive
(l_nlen-4)));
> statement.addWarning(notify.getMessage());

I am not sure about the use of unix diff. files as I have other modifcations to
this file that come before this one so below is the name of the function and
the placement in this function to identify the code which requires replacing,
in the case that the above diff. is not helpfull.

In function:
private BaseResultSet executeV3() throws SQLException

case 'N': // Error Notification
    int l_nlen = pgStream.ReceiveIntegerR(4);
    PSQLException notify =
PSQLException.parseServerError(connection.getEncoding().decode(pgStream.Receive
(l_nlen-4)));
    statement.addWarning(notify.getMessage());
    break;

Regards
Donald Fraser


Responses

pgsql-bugs by date

Next:From: David FetterDate: 2004-08-06 17:14:44
Subject: Regex bug
Previous:From: Kris JurkaDate: 2004-08-06 07:14:39
Subject: Re: PROBLEMS!!!

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