title: Postgresql with Npgsql "relation <tablename> does not exist." Only occurring on Win 7
body: <p>I'm running into a very strange bug when using Postgresql using the Npgsql (2.0.11 and 2.0.11.94) DLL in .NET 3.5.</p>
  
  <p>I've created a program that will run these two queries (these are copied directly from the programs output):</p>
  
  <pre><code>INSERT INTO "db_events" VALUES ('2','1','2','1', to_timestamp('2012/08/27 10:22:43', 'YYYY/MM/DD HH24:MI:SS'),'2012', '8', '27', '10', '22', '43', '35' );
  
  INSERT INTO "db_events_counts" VALUES ('1','2', '0', '1', '0', '1' );
  </code></pre>
  
  <p>This program will run perfectly fine on Windows XP x86 with both postgres 8.4.12 and 9.0.9, and will enter the data into the tables as it should.</p>
  
  <p>However, when running the exact same program on Windows 7 with a database that has been set up in an identical way to the Windows XP data base, I run into the error:</p>
  
  <pre><code>ERROR: 42P01: relation "db_events" does not exist
  </code></pre>
  
  <p>I have read that this error is because postgres is forcing table names to lowercase, which is fine since they are already. Or that a table created with quotes has to be referenced with quotes, which is also fine since I am using quotes.</p>
  
  <p>In the windows 7 database, if i copy and paste these two queries into pgadmin, they work fine, no errors, this leads me to believe it's something to do with the DLL?</p>
  
  <p>What doesn't make sense is this program working bug free on my Windows XP system while throwing this error constantly on Windows 7.</p>
  
  <p>I also try a simple delete statement:</p>
  
  <pre><code>DELETE FROM "db_events"; DELETE FROM "db_events_counts";
  </code></pre>
  
  <p>But that also ends in the same error.</p>
  
  <p>Is there anything I am missing? 
  Does Npgsql need to be compiled in the same windows environment as it's run in? 
  or is there some subtle difference between windows 7 and windows XP with postgres that I am not getting.</p>
  
  <p>Any help or information on the topic would be greatly appreciated.</p>
  
  <hr>
  
  <p>Due to questions about the connection, here is what i have tried:</p>
  
  <pre><code>Server=localhost;Port=5433;User Id=databaseuser;Password=databaseuser_123;Database=db123;
  Server=127.0.0.1;Port=5433;User Id=databaseuser;Password=databaseuser_123;Database=db123;
  Server=10.223.132.123;Port=5433;User Id=databaseuser;Password=databaseuser_123;Database=db123;
  </code></pre>
  
  <p>The last being the local machines IP address.</p>
  
  <hr>
  
  <p>Here is a short log of the program connecting and disconnecting from the server on Win 7:<br>
  // connecting</p>
  
  <pre><code>2012-08-27 11:26:00 EST ERROR:  relation "db_events" does not exist at character 13
  2012-08-27 11:26:00 EST STATEMENT:  DELETE FROM "db_events"; DELETE FROM "db_events_counts";
  2012-08-27 12:52:29 EST ERROR:  relation "db_events" does not exist at character 13
  2012-08-27 12:52:29 EST STATEMENT:  INSERT INTO "db_events" VALUES ('114','1','2','1', to_timestamp('2012/08/27 12:52:29', 'YYYY/MM/DD HH24:MI:SS'),'2012', '8', '27', '12', '52', '29', '35' );
  </code></pre>
  
  <p>// disconnecting</p>
  
  <pre><code>2012-08-27 11:26:07 EST LOG:  could not receive data from client: No connection could be made because the target machine actively refused it.
  2012-08-27 11:26:07 EST LOG:  unexpected EOF on client connection
  </code></pre>