Обсуждение: Notifications in JDBC driver not correct for V3 protocol

Поиск
Список
Период
Сортировка

Notifications in JDBC driver not correct for V3 protocol

От
"Donald Fraser"
Дата:
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

Re: Notifications in JDBC driver not correct for V3 protocol

От
Kris Jurka
Дата:
On Fri, 6 Aug 2004, Donald Fraser wrote:

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

Fixed.  Thanks.

Kris Jurka