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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-bugs by date

  From Date Subject
Next Message David Fetter 2004-08-06 17:14:44 Regex bug
Previous Message Kris Jurka 2004-08-06 07:14:39 Re: PROBLEMS!!!