pgsql/src/interfaces/jdbc example/basic.java o ...

From: barry(at)postgresql(dot)org
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql/src/interfaces/jdbc example/basic.java o ...
Date: 2001-11-25 23:27:00
Message-ID: 200111252327.fAPNR0x23511@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

CVSROOT: /cvsroot
Module name: pgsql
Changes by: barry(at)postgresql(dot)org 01/11/25 18:26:59

Modified files:
src/interfaces/jdbc/example: basic.java
src/interfaces/jdbc/org/postgresql: Connection.java
ResultSet.java
Statement.java
src/interfaces/jdbc/org/postgresql/core: QueryExecutor.java
src/interfaces/jdbc/org/postgresql/jdbc1: Connection.java
PreparedStatement.java
ResultSet.java
src/interfaces/jdbc/org/postgresql/jdbc2: Connection.java
PreparedStatement.java
ResultSet.java
UpdateableResultSet.java
src/interfaces/jdbc/org/postgresql/util: MD5Digest.java
Serialize.java

Log message:
This patch fixes a bug reported by Graham Leggett (minfrin(at)sharp(dot)fm).
The bug was that any insert or update would fail if the returned oid was
larger than a signed int. Since OIDs are unsigned int's it was
a bug that the code used a java signed int to deal with the values. The bug
would result in the error message: "Unable to fathom update count".
While fixing the bug, it became apparent that other code made a similar
assumption about OIDs being signed ints. Therefore some methods that returned
or took OIDs are arguements also needed to be changed.
Since we are so close to the 7.2 release I have added new methods that
return longs and deprecated the old methods returning ints. Therefore all
old code should still work without requiring a code change to cast from long to int. Also note that the methods below are PostgreSQL specific extensions to
the JDBC api are are not part of the spec from Sun, thus it is unlikely that
they are used much or at all.

The deprecated methods are:
ResultSet.getInsertedOID()
Statement.getInsertedOID()
Serialize.store()
Connection.putObject()
and are replaced by:
ResultSet.getLastOID()
Statement.getLastOID()
Serialize.storeObject()
Connection.storeObject()
All the deprecated methods returned int, while their replacements return long

This patch also fixes two comments in MD5Digest that the author Jeremy Wohl
submitted.

--Barry

Browse pgsql-committers by date

  From Date Subject
Next Message tgl 2001-11-26 00:29:15 pgsql/src/backend/utils/adt ruleutils.c
Previous Message petere 2001-11-25 22:19:30 pgsql/src/bin/initdb initdb.sh