title: why does executeUpdate return 1 even if no new row has been inserted?
body: <p>here is my very simple table (Postgres):</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS PERFORMANCE.TEST
  (
  test text NOT NULL UNIQUE
  );
  </code></pre>
  
  <p>if I try to insert a String using the command below FROM the database,everything works as expected, not surprisingly a new row appears in the DB.</p>
  
  <pre><code>insert into performance.test (test) values ('abbbbaw');
  </code></pre>
  
  <p>However if I want to insert a String through JDBC, nothing gets inserted, although preparedStatement.executeUpdate() always returns 1. </p>
  
  <p>Below is my method that should be working but it does not. Please tell me if I am missing something obvious.
  I want to add that I never get any SQLException.</p>
  
  <pre><code>private void storePerformance() {
      Connection conn= initializePerformanceConnection();
      if (conn!= null) {
         PreparedStatement insertPS = null;
          try {
              insertPS = conn.prepareStatement("insert into performance.test (test) values (?)");
              insertPS.setString(1, queryVar);
               int i = insertPS.executeUpdate();
              LogManager.doLog(LOG, LOGLEVEL.INFO," numberofrows= "+i);
  
          }  catch (SQLException e) {
              LogManager.doLog(LOG, LOGLEVEL.INFO,"Inserting query failed = "+queryVar,e);
          }finally{
              if(insertPS != null){
                  try {
                      insertPS.close();
                  } catch (SQLException e) {
                      LogManager.doLog(LOG, LOGLEVEL.INFO,"Closing PreparedStatement failed = "+queryVar,e);
                  }
              }
              try {
                  conn.close();
              } catch (SQLException e) {
                  LogManager.doLog(LOG, LOGLEVEL.INFO,"Closing performanceConnection failed= "+ queryVar, e);
              }
          }           
      }
  }
  </code></pre>