Subject | Re: [ib-support] trigger on a blob field |
---|---|
Author | Ivan Prenosil |
Post date | 2002-12-04T10:25:18Z |
> From: Thomas Steinmaurer <ts@...>- Firebird allows direct comparison of blobs (but separate testing
> 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.
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