title: Save line break in database in text field
body: <p>See the Java code used to save the execution plan in database PostgreSQL, the problem is that this plan saved in the database, loses the line breaks and indention. If anyone can help me make this code save the indentations and line breaks originated from the return of the Explain Analyze command from PostgreSQL. The field of problems is FULL_EXPLAIN, this field is type Text in postgresql table. </p>
  
  <p>---------------- JAVA CODE ---------------------</p>
  
  <pre><code>StringBuilder ConsultaExplain = new StringBuilder();
  ConsultaExplain.append("EXPLAIN (ANALYZE, BUFFERS)  ");
  ConsultaExplain.append(SQLtxtQuery);
  
  ResultSet result2 = BancoDeDados.getResultSet(ConsultaExplain.toString());
  
      StringBuilder str1 = new StringBuilder();
      str1.append("Execution plan...:");
      SQLtxtQuery2 = SQLtxtQuery;
      while (result2.next()) {
          SQLtxtQuery2 = result2.getString(1);
          str1.append(SQLtxtQuery2);
      }
          String myString = str1.toString();
          String myNewStringNoQuotes = myString.replaceAll("'", "_");
  
      StringBuilder exeSQLUpdateTabAcao = new StringBuilder();
      exeSQLUpdateTabAcao.append(
      "UPDATE TAB_CTRL_TEMPO SET OCORRENCIA_TEMPO= current_timestamp, FULL_EXPLAIN ='");
      exeSQLUpdateTabAcao.append(myNewStringNoQuotes);
      exeSQLUpdateTabAcao.append("' WHERE id = currval('tab_ctrl_tempo_id_seq')");
      BancoDeDados.execStatement(exeSQLUpdateTabAcao.toString());
  </code></pre>