diff --git a/org/postgresql/jdbc2/AbstractJdbc2ResultSetMetaData.java b/org/postgresql/jdbc2/AbstractJdbc2ResultSetMetaData.java
index <HASH>..<HASH> 100644
--- a/org/postgresql/jdbc2/AbstractJdbc2ResultSetMetaData.java
+++ b/org/postgresql/jdbc2/AbstractJdbc2ResultSetMetaData.java
@@ -237,8 +237,8 @@ public abstract class AbstractJdbc2ResultSetMetaData implements PGResultSetMetaD
         Statement stmt = connection.createStatement();
         ResultSet rs = stmt.executeQuery(sql.toString());
         while (rs.next()) {
-            int table = rs.getInt(1);
-            int column = rs.getInt(2);
+            int table = (int)rs.getLong(1);
+            int column = (int)rs.getLong(2);
             String columnName = rs.getString(3);
             String tableName = rs.getString(4);
             String schemaName = rs.getString(5);
Fix ResultSetMetaData retrieval when the oid counter exceeds INT_MAX.

Since Java doesn't have unsigned ints we retrieve the values as long
and then truncate to int, so it may have a negative value.

As reported by Owen Tran.