Subject RE: [IBO] Viewing source for computed column with IB_SQL?
Author Thomas Steinmaurer
> I have a table with a computed column. If I connect to the database
> with IB_SWL, then browse the database, and look at the source for the
> table, I see the following for that field:
>
> , PRODAVGCOST DOUBLE PRECISION /* Computed */
>
> Why is there only a comment about it being computed? Where is the
> "computed by" clause? How can I see that?

I don't know the IB_SQL way (perhaps it isn't supported), but you
can query the RDB$FIELDS system table yourself, if you like ;-).


select
rf.rdb$relation_name,
rf.rdb$field_name,
f.rdb$computed_source
from rdb$fields f join rdb$relation_fields rf on (f.rdb$field_name=rf.rdb$field_source)
where f.rdb$computed_blr is not null;



Best Regards,
Thomas Steinmaurer

The IB LogManager Product Family
Logging/auditing suite for InterBase/Firebird
http://www.iblogmanager.com