title: Find out which schema based on table values
body: <p>My database is separated into schemas based on clients (i.e.: each client has their own schema, with same data structure).</p>
  
  <p>I also happen to have an external action that does not know which schema it should target. It comes from another part of the system that has no concepts of clients and does not know in which client's set it is operating. Before I process it, I have to find out which schema that request needs to target</p>
  
  <p>To find the right schema, I have to find out which holds the record <code>R</code> with a particular unique ID (string)</p>
  
  <p>From my understanding, the following </p>
  
  <pre><code>SET search_path TO schema1,schema2,schema3,...
  </code></pre>
  
  <p>will only look through the tables in schema1 (or the first schema that matches the table) and will not do a global search.</p>
  
  <p>Is there a way for me to do a global search across all schemas, or am I just going to have to use a for loop and iterate through all of them, one at a time?</p>