Subject Re: [ib-support] trigger on a blob field
Author Ivan Prenosil
> From: Thomas Steinmaurer <ts@...>
> According to a logging trigger created by IBLM ;-), NULL values
> must be considered separately.
>
> An general example:
>
> if (((OLD.COLUMN IS NULL) AND (NEW.COLUMN IS NOT NULL)) OR
> ((OLD.COLUMN IS NOT NULL) AND (NEW.COLUMN IS NULL)) OR
> (OLD.COLUMN <> NEW.COLUMN)) THEN
> ...
>
> Be aware, that BLOB column values can't be compared by using
> the OLD and NEW context variables. You'll have to use a UDF
> for this.

- Firebird allows direct comparison of blobs (but separate testing
of nulls is still needed)

- using UDF should work for both IB/FB, and Null state of blob
column can be tested directly in UDF

Ivan
http://www.volny.cz/iprenosil/interbase