Subject | Re: [firebird-support] Interpreting string as field name... |
---|---|
Author | Helen Borrie |
Post date | 2003-11-07T07:37:49Z |
At 08:14 AM 7/11/2003 +0100, you wrote:
If you want to perform this test in a trigger, you will have to hard-code
it for each column in your PSQL code. You could, however, create a
client-side utility routine for yourself, to build a script for creating
such BEFORE UPDATE triggers for each of your volatile tables. Your program
can query RDB$RELATION_FIELDS to get all of the column names for a table.
heLen
>Hi!There is no way to create run-time references to metadata objects in PSQL.
>
>Is there any way, within a trigger, to interpret a string as a field name?
>For example, I'd like to be able to scroll through the list of fields
>for my table in the Update trigger, and make a list of those that have
>been modified (comparing new and old). Is this at all possible? Or is
>there some other way of getting a list of modified fields?
If you want to perform this test in a trigger, you will have to hard-code
it for each column in your PSQL code. You could, however, create a
client-side utility routine for yourself, to build a script for creating
such BEFORE UPDATE triggers for each of your volatile tables. Your program
can query RDB$RELATION_FIELDS to get all of the column names for a table.
heLen