Mark,

> I am currently going over the JDBC metadata returned by Jaybird, and I
> was looking for a way to see if a column is COMPUTER BY / GENERATED
> ALWAYS AS.
>
> I found that I should probably look at RDB$FIELDS.RDB$COMPUTED_BLR or
> RDB$COMPUTED_SOURCE for this, but I noticed that
> RDB$RELATION_FIELDS.RDB$UPDATE_FLAG is 0 for a computed column, while it
> is 1 for 'normal' fields.

The definitive sign of a computed field is RDB$COMPUTED_BLR in either
RDB$FIELDS or RDB$DOMAINS if the field is defined through a domain.
The computed source is kept for the convenience of utilities that
recreate the DDL, but can be deleted without changing the semantics of
the field.  I wouldn't rely on the update flag which could be used in
the future for other types of fields that can't be modified.


Best regards,

Ann

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to