title: PostgreSql -> CTE + UPDATE + DELETE -> not expected result, why?
body: <p>Just interested, why below ( simplified ) example works this way.</p>
  
  <pre><code>CREATE TABLE test (id SERIAL, val INT NOT NULL, PRIMARY KEY(id));
  INSERT INTO test (val) VALUES (1);
  
  WITH t AS ( UPDATE test SET val = 1 RETURNING id ) 
  DELETE FROM test WHERE id IN ( SELECT id FROM t);
  </code></pre>
  
  <p>Result:<br />
  <strong>DELETE 0</strong></p>
  
  <p>Question:<br />
  <strong>Why DELETE did not find any rows to delete?</strong></p>
  
  <p>PostgreSql version 9.2.1<br />
  Transaction isolation = read commited</p>
  
  <p>Thanks!</p>