docs: @Override
      protected String handleParens(String group, String prefix, String suffix, boolean debugPrint) {
          // Default values, which indicate that the prefix simply goes before
          // the entire group, and the suffix simply follows the entire group
          int p_index = 0;
          int s_index = group.length();
  
          int numOpenParens  = numOccurencesOfCharIn(group, '(');
          int numCloseParens = numOccurencesOfCharIn(group, ')');
  
          if (debugPrint) {
              System.out.println("    In PostgreSQLBackend.handleParens:");
              System.out.println("      prefix: " + prefix);
              System.out.println("      group : " + group);
              System.out.println("      suffix: " + suffix);
              System.out.println("      numOpenParens, numCloseParens: "+numOpenParens+", "+numCloseParens);
          }
  
          // Case for a function (e.g., AVG, CEILING, FLOOR), i.e., the group is
          // something like: AVG(expression); check if the expression  has too
          // many close-parentheses in it, and if so, put the suffix before the
          // extra close-parentheses
          if (numOpenParens < numCloseParens && !suffix.isEmpty())  {
              s_index = indexOfNthOccurrenceOfCharIn(group, ')', numOpenParens + 1);
  
          // Similarly, check if the expression has too many open-parentheses in
          // it, and if so, put the prefix after the extra open-parentheses
          } else if (numOpenParens > numCloseParens && !prefix.isEmpty()) {
              p_index = indexOfNthOccurrenceOfCharIn(group, '(', numOpenParens-numCloseParens) + 1;
          }
  
          // Special case, for divisionQueryTransformer or bigintDivisionQueryTransformer,
          // i.e., the group is something like: expression1 / expression2; check
          // if there are too many open-parentheses
          if (!group.toUpperCase().startsWith("AVG") && (
                  ( DIVISION_QUERY_TRANSFORMER_PREFIX.equals(prefix)
                          && DIVISION_QUERY_TRANSFORMER_SUFFIX.equals(suffix) )
                  || (BIGINT_DIV_QUERY_TRANSFORMER_PREFIX.equals(prefix)
                          && BIGINT_DIV_QUERY_TRANSFORMER_SUFFIX.equals(suffix)) ) ) {
              int numDivOperators = numOccurencesOfCharIn(group, '/');
              int div_index = -2;
              if (numDivOperators != 1) {
                  // Less than one should be impossible here; more than one means
                  // a potentially ambiguous situation
                  System.out.println("\nWARNING: in PostgreSQLBackend.handleParens, "
                          + "numDivOperators is not 1: " + numDivOperators);
                  if (!debugPrint) {
                      System.out.println("In PostgreSQLBackend.handleParens:");
                      System.out.println("  prefix: " + prefix);
                      System.out.println("  group : " + group);
                      System.out.println("  suffix: " + suffix);
                      System.out.println("  numOpenParens, numCloseParens: "+numOpenParens+", "+numCloseParens);
                      debugPrint = true;
                  }
              }
              if (numDivOperators > 0) {
                  div_index = group.indexOf('/');
                  String preDiv = group.substring(0, div_index);
                  int numPreDivOpenParens  = numOccurencesOfCharIn(preDiv, '(');
                  int numPreDivCloseParens = numOccurencesOfCharIn(preDiv, ')');
                  String postDiv = group.substring(div_index);
                  int numPostDivOpenParens  = numOccurencesOfCharIn(postDiv, '(');
                  int numPostDivCloseParens = numOccurencesOfCharIn(postDiv, ')');
                  if (numPreDivOpenParens > numPreDivCloseParens) {
                      // Put the prefix after the last unmatched open-parenthesis
                      p_index = indexOfNthOccurrenceOfCharIn(preDiv, '(', numPreDivOpenParens-numPreDivCloseParens) + 1;
                  }
                  if (numPreDivOpenParens >= numPreDivCloseParens && numPostDivOpenParens < numPostDivCloseParens) {
                      // Put the suffix before the first unmatched close-parenthesis
                      s_index = div_index + indexOfNthOccurrenceOfCharIn(postDiv, ')', numPostDivOpenParens+1);
                  }
  
                  if (debugPrint) {
                      System.out.println("    div_index: " + div_index);
                      System.out.println("    preDiv   : " + preDiv);
                      System.out.println("    postDiv  : " + postDiv);
                      System.out.println("    numPreDivOpenParens,  numPreDivCloseParens : "+numPreDivOpenParens+", "+numPreDivCloseParens);
                      System.out.println("    numPostDivOpenParens, numPostDivCloseParens: "+numPostDivOpenParens+", "+numPostDivCloseParens);
                  }
              }
          }
  
          String result =    group.substring(0, p_index)
                  + prefix + group.substring(p_index, s_index) + suffix
                           + group.substring(s_index);
  
          if (debugPrint) {
              System.out.println("    p_index, s_index: " + p_index+", "+s_index);
              System.out.println("    result: " + result);
          }
  
          return result;
      }