Subject Firebird default source question
Author jvpgr
Hi all,

I am currently using Firebird-2.5.0.24118-0, but I have seen the same behavior in earlier versions as well.

I have a table with a field using the default source property to get it's value when null is inserted in the table and an updatable view on the table.

When I insert a record directly to the table, the default source of the field works as expected, the same when I am using the view to insert the record _IF_ the view is "directly" updatable, meaning that it uses only the given table w/o any before insert triggers to update the underlying table.

If before insert triggers are used, such as

insert into table(field...)
values (new.view_field,...)

I get an "field <field> value is null" for the field with the default source. I certainly can bypass the problem using something like coalesce(new.view_field,<default value>), but I would like to know the reason of this behavior.

any suggestions highly appreciated.

TIA,
Yannis