diff --git a/org/postgresql/jdbc2/TypeInfoCache.java b/org/postgresql/jdbc2/TypeInfoCache.java
index 59a44c5..be5a012 100644
--- a/org/postgresql/jdbc2/TypeInfoCache.java
+++ b/org/postgresql/jdbc2/TypeInfoCache.java
@@ -241,7 +241,9 @@ public class TypeInfoCache implements TypeInfo {
         }
         rs.close();
 
-        _pgNameToSQLType.put(pgTypeName, type);
+        if(pgTypeName != null) {
+            _pgNameToSQLType.put(pgTypeName, type);
+        }
 
         return type.intValue();
     }
