title: Dirty Reads in Postgres
body: <p>I have a long running function that should be inserting new rows.  How do I check the progress of this function?</p>
  
  <p>I was thinking dirty reads would work so I read <a href="http://www.postgresql.org/docs/8.4/interactive/sql-set-transaction.html" rel="noreferrer">http://www.postgresql.org/docs/8.4/interactive/sql-set-transaction.html</a> and came up with the following code and ran it in a new session:</p>
  
  <pre><code>
  SET SESSION CHARACTERISTICS AS SERIALIZABLE;
  
  SELECT * FROM MyTable;
  </code></pre>
  
  <p>Postgres gives me a syntax error.  What am I doing wrong?  If I do it right, will I see the inserted records while that long function is still running?</p>
  
  <p>Thanks</p>