stmt = conn.prepareStatement( "SELECT count(*) FROM pg_type t, pg_namespace n" + " WHERE t.typnamespace = n.oid" + "   AND t.typname = ?" + "   AND n.nspname = ?");  rs = stmt.executeQuery(); if(!rs.next() && rs.getInt(1) > 0) throw new SQLException("Unknown type " + sqlTypeName);
	public static void addTypeMapping(String sqlTypeName, String javaClassName)	throws SQLException	{		Connection conn = DriverManager.getConnection("jdbc:default:connection");		try		{			// TODO: Add type check, etc.		}		finally		{			try { conn.close(); } catch(SQLException e) { /* ignore */ }		}	}