title: How to check if a table exists in a given schema
body: <p>Postgres 8.4 and greater databases contain common tables in <code>public</code> schema and company specific tables in <code>company</code> schema.<br>
  <code>company</code> schema names always start with <code>'company'</code> and end with the company number.<br>
  So there may be schemas like:</p>
  
  <pre><code>public
  company1
  company2
  company3
  ...
  companynn
  </code></pre>
  
  <p>An application always works with a single company.<br>
  The <code>search_path</code> is specified accordingly in odbc or npgsql connection string, like:</p>
  
  <pre><code>search_path='company3,public'
  </code></pre>
  
  <p>How would you check if a given table exists in a specified <code>companyn</code> schema?</p>
  
  <p>eg:</p>
  
  <pre><code>select isSpecific('company3','tablenotincompany3schema')
  </code></pre>
  
  <p>should return <code>false</code>, and</p>
  
  <pre><code>select isSpecific('company3','tableincompany3schema')
  </code></pre>
  
  <p>should return <code>true</code>.</p>
  
  <p>In any case, the function should check only <code>companyn</code> schema passed, not other schemas.</p>
  
  <p>If a given table exists in both <code>public</code> and the passed schema, the function should return <code>true</code>.<br>
  It should work for Postgres 8.4 or later.</p>