          # Some backends return 1 item tuples with strings, and others return
          # tuples with integers and strings. Flatten them out into strings.
          for row in result[0]:
              if not isinstance(row, str):
                  yield ' '.join(output_formatter(c) for c in row)
              else:
 
</s> remove                 yield ' '.join(str(c) for c in row)
 </s> add                 yield ' '.join(output_formatter(c) for c in row)
        output_formatter = json.dumps if self.query.explain_format == 'json' else str
          # Some backends return 1 item tuples with strings, and others return
          # tuples with integers and strings. Flatten them out into strings.
        output_formatter = json.dumps if self.query.explain_format == 'json' else str
          for row in result[0]:
              if not isinstance(row, str):
                  yield ' '.join(output_formatter(c) for c in row)
              else:
keep add keep keep keep keep
 Fixed #32226 -- Fixed JSON format of QuerySet.explain() on PostgreSQL. 
django/db/models/sql/compiler.py