Commit 45a6343e authored by Barry Lind's avatar Barry Lind

Patch from Ned Wolpert that fixes a bug that caused the cache of types not

to be used, causing extra sql statements to be executed.  This was a
significant performance problem with the database meta data classes.
The fix is a simple one liner.
parent 4433eb1d
...@@ -11,7 +11,7 @@ import org.postgresql.util.*; ...@@ -11,7 +11,7 @@ import org.postgresql.util.*;
import org.postgresql.core.*; import org.postgresql.core.*;
/* /*
* $Id: Connection.java,v 1.39 2001/11/25 23:26:56 barry Exp $ * $Id: Connection.java,v 1.40 2001/12/11 04:44:23 barry Exp $
* *
* This abstract class is used by org.postgresql.Driver to open either the JDBC1 or * This abstract class is used by org.postgresql.Driver to open either the JDBC1 or
* JDBC2 versions of the Connection class. * JDBC2 versions of the Connection class.
...@@ -1103,7 +1103,7 @@ public abstract class Connection ...@@ -1103,7 +1103,7 @@ public abstract class Connection
*/ */
public int getSQLType(int oid) throws SQLException public int getSQLType(int oid) throws SQLException
{ {
Integer sqlType = (Integer)typeOidCache.get(new Integer(oid)); Integer sqlType = (Integer)sqlTypeCache.get(new Integer(oid));
// it's not in the cache, so perform a query, and add the result to the cache // it's not in the cache, so perform a query, and add the result to the cache
if (sqlType == null) if (sqlType == null)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment