title: Npgsql with PostgreSQL: Can't see uncommitted changes with UNCOMMITTED READ
body: <p>I'm using Npsql with PostgreSQL. I want to see uncommitted changes of one transaction in a different one.</p>
  
  <p>This is how I create my connection and transaction:</p>
  
  <pre><code>// create connection
  m_Connection = new NpgsqlConnection(connectionString);
  m_Connection.Open();
  
  //create transaction
  m_Transaction = m_Connection.BeginTransaction(IsolationLevel.ReadUncommitted);
  </code></pre>
  
  <p>In one thread I insert a row like so:</p>
  
  <pre><code> NpgsqlCommand command = CreateCommand("INSERT INTO TABLEA  ....", parameters, commandTimeout)
   command.ExecuteNonQuery();
  </code></pre>
  
  <p>and process something else without committing or rolling back the transaction.</p>
  
  <p>In a different thread I read a row like so:</p>
  
  <pre><code> NpgsqlCommand command = CreateCommand("SELECT COUNT(*) FROM TABLEA", parameters, commandTimeout);
   command.ExecuteScalar();
  </code></pre>
  
  <p>but somehow I don't see the results of the first INSERT. I don't see the results of the insert in pgAdmin either (even after running SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED). </p>
  
  <p>What am I doing wrong? Any help will be appreciated.</p>