code: private String processSchemaName(String dbProductName, String userName, String schemaName) {
          String result = null;
  
          if (schemaName != null) {
              result = schemaName.toUpperCase();
          } else {
              if ("DB2".equals(dbProductName) == true || "Apache Derby".equals(dbProductName) == true || "Oracle".equals(dbProductName) == true) {
                  if (userName != null) {
                      result = userName.toUpperCase();
                  }
              } else if ("PostgreSQL".equals(dbProductName) == true) {
                  // for PostgreSQL - if no schema specified - public should be used
                  result = "public";
              }
          }
  
          return result;
      }
docs: Processes Schema name so it would be compatible with database
  
  @param dbProductName short database name
  @param userName      user name
  @param schemaName    schema name which would be processed
  @return processed schema name