title: PostgreSQL "Column does not exist" but it actually does
body: <p>I'm writing a <code>Java</code> application to automatically build and run SQL queries. For many tables my code works fine but on a certain table it gets stuck by throwing the following exception:</p>
  
  <pre><code>Exception in thread "main" org.postgresql.util.PSQLException: ERROR: column "continent" does not exist
    Hint: Perhaps you meant to reference the column "countries.Continent".
    Position: 8
  </code></pre>
  
  <p>The query that has been run is the following:</p>
  
  <pre><code>SELECT Continent
  FROM network.countries
  WHERE Continent IS NOT NULL
  AND Continent &lt;&gt; ''
  LIMIT 5
  </code></pre>
  
  <p>This essentially returns <code>5</code> non-empty values from the column.</p>
  
  <p>I don't understand why I'm getting the "column does not exist" error when it clearly does in <a href="https://www.pgadmin.org/download/windows4.php" rel="noreferrer">pgAdmin 4</a>. I can see that there is a schema with the name <code>Network</code> which contains the table <code>countries</code> and that table has a column called <code>Continent</code> just as expected.</p>
  
  <p>Since all column, schema and table names are retrieved by the application itself I don't think there has been a spelling or semantical error so why does <a href="https://www.postgresql.org/" rel="noreferrer">PostgreSQL</a> cause problems regardless? Running the query in pgAdmin4 nor using the suggested <code>countries.Continent</code> is working.</p>
  
  <p>My PostgreSQL version is the newest as of now:</p>
  
  <pre><code>$ psql --version
  psql (PostgreSQL) 9.6.1
  </code></pre>
  
  <p>How can I successfully run the query?</p>