title: How to test for object existence in Firebird SQL?
body: <p>I need to test whether various types of database objects exist in a given database, and I don't know how to formulate these tests in Firebird SQL. Each test has the form "Does object of type <em>X</em> with name <em>Y</em> exist?". For example, I need to test whether a table with a given name exists.  The object types I need to test are:</p>
  
  <ul>
  <li>Table</li>
  <li>View </li>
  <li>Domain </li>
  <li>Trigger </li>
  <li>Procedure</li>
  <li>Exception </li>
  <li>Generate </li>
  <li>UDF </li>
  <li>Role</li>
  </ul>
  
  <p>One can find how to query for a given table on the Internet, but the other types are more difficult to find ...</p>