code: MolgenisValidationException translateCheckConstraintViolation(PSQLException pSqlException) {
      ServerErrorMessage serverErrorMessage = pSqlException.getServerErrorMessage();
      String tableName = serverErrorMessage.getTable();
      String constraintName = serverErrorMessage.getConstraint();
      // constraint name: <tableName>_<columnName>_chk
      String columnName =
          constraintName.substring(tableName.length() + 1, constraintName.length() - 4);
      ConstraintViolation constraintViolation =
          new ConstraintViolation(
              format(
                  "Unknown enum value for attribute '%s' of entity '%s'.",
                  tryGetAttributeName(tableName, columnName).orElse(TOKEN_UNKNOWN),
                  tryGetEntityTypeName(tableName).orElse(TOKEN_UNKNOWN)),
              null);
      return new MolgenisValidationException(singleton(constraintViolation));
    }
docs: Package private for testability
  
  @param pSqlException PostgreSQL exception
  @return translated validation exception