code: static String getJunctionTableIndexName(
        EntityType entityType, Attribute attr, Attribute idxAttr) {
      String indexNamePostfix = "_idx";
      int nrAdditionalChars = 1 + indexNamePostfix.length();
      String entityPart =
          generateId(entityType, (MAX_IDENTIFIER_BYTE_LENGTH - nrAdditionalChars) / 3);
      String attrPart = generateId(attr, (MAX_IDENTIFIER_BYTE_LENGTH - nrAdditionalChars) / 3);
      String idxAttrPart = generateId(idxAttr, (MAX_IDENTIFIER_BYTE_LENGTH - nrAdditionalChars) / 3);
      return getQuotedIdentifier(entityPart + '_' + attrPart + '_' + idxAttrPart + indexNamePostfix);
    }
docs: Returns the junction table index name for the given indexed attribute in a junction table
  
  @param entityType entity meta data
  @param attr attribute
  @param idxAttr indexed attribute
  @return PostgreSQL junction table index name