title: Determine Firebird Version with SQL (Version < 2.1)
body: <p>I have an application that handles databases on various locations, and I want to build in a check that these databases are opened using Firebird 2.5 or later. We have recently migrated from Firebird 2.0 to 2.5 and we have a lot of databases out there that respond to </p>
  
  <pre><code>select rdb$get_context('SYSTEM','ENGINE_VERSION') as "version" from RDB$DATABASE
  </code></pre>
  
  <p>with 'SQL error code = -804 Function unknown RDB$GET_CONTEXT. I guess because they were built with Firebird 2.0 - a rebuild to 2.5 fixed it.</p>
  
  <p>Is there a way of detecting which firebird service is in use that can be applied to databases older than 2.1?</p>