code: protected void checkIndex(int parameterIndex, int type1, int type2, String getName)
        throws SQLException {
      checkIndex(parameterIndex);
      if (type1 != this.testReturn[parameterIndex - 1]
          && type2 != this.testReturn[parameterIndex - 1]) {
        throw new PSQLException(
            GT.tr("Parameter of type {0} was registered, but call to get{1} (sqltype={2}) was made.",
                    "java.sql.Types=" + testReturn[parameterIndex - 1], getName,
                    "java.sql.Types=" + type1),
            PSQLState.MOST_SPECIFIC_TYPE_DOES_NOT_MATCH);
      }
    }
docs: helperfunction for the getXXX calls to check isFunction and index == 1 Compare BOTH type fields
  against the return type.
  
  @param parameterIndex parameter index (1-based)
  @param type1 type 1
  @param type2 type 2
  @param getName getter name
  @throws SQLException if something goes wrong