title: Firebird - get all modified fields inside a trigger
body: <p>I need to get all the values which changed in a row and post modifications on other 'audit' table. Can I accomplish this, without writing the conditions for each element from the row? I know the SQL from <a href="http://www.firebirdfaq.org/faq133/" rel="nofollow noreferrer">http://www.firebirdfaq.org/faq133/</a> which gives you all the conditions for verifications:</p>
  
  <pre><code>select 'if (new.' || rdb$field_name || ' is null and old.' ||
  rdb$field_name || ' is not null or new.' || rdb$field_name ||
  'is not null and old.' || rdb$field_name || ' is null or new.' ||
  rdb$field_name || ' &lt;&gt; old.' || rdb$field_name || ') then'
  from rdb$relation_fields
  where rdb$relation_name = 'EMPLOYEE';
  </code></pre>
  
  <p>but this should be written in the trigger. So, if I change a table then I need to modify the trigger. </p>
  
  <p>Due the fact that FireBird does not allow dynamically increasing the size of a varchar variable I was thinking of casting and concatenating all the values to a big varchar variable, before inserting it in a text blob.</p>
  
  <p>Is there any possibility to accomplish this, without using <a href="http://www.firebirdsql.org/refdocs/langrefupd21-ddl-table.html" rel="nofollow noreferrer">GTTs</a>?  </p>