Notifications in JDBC driver not correct for V3 protocol - Mailing list pgsql-bugs

From Donald Fraser
Subject Notifications in JDBC driver not correct for V3 protocol
Date
Msg-id 000b01c47b98$1e0891a0$6364a8c0@DonAcer
Whole thread Raw
Responses Re: Notifications in JDBC driver not correct for V3 protocol
List 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

pgsql-bugs by date:

Previous
From: Kris Jurka
Date:
Subject: Re: PROBLEMS!!!
Next
From: David Fetter
Date:
Subject: Regex bug