You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every RDB$FIELDS.RDB$COMPUTED_SOURCE are null except for the ones from table computed fields.
Views with subqueries or expressions as fields should also have the correct computed source.
I've found this because I would like to pinpoint fields from views and try to execute statement the view source with only selected fields.
This is the sql query I was trying to build.
select
RF.RDB$FIELD_POSITION,
coalesce(trim(VR.RDB$CONTEXT_NAME) || '.' || trim(RF.RDB$BASE_FIELD), F.RDB$COMPUTED_SOURCE)
from
RDB$RELATION_FIELDS RF left join
RDB$VIEW_RELATIONS VR on RF.RDB$RELATION_NAME = VR.RDB$VIEW_NAME and RF.RDB$VIEW_CONTEXT = VR.RDB$VIEW_CONTEXT left join
RDB$FIELDS F on F.RDB$FIELD_NAME = RF.RDB$FIELD_SOURCE
where
RF.RDB$RELATION_NAME = 'VIEW_NAME'
order by
RF.RDB$FIELD_POSITION
The text was updated successfully, but these errors were encountered:
System tables are for the engine to operate and for extracting the source code as DDL. These tasks work fine without this new feature. So far I don't see any good rationale why this is necessary.
Submitted by: Valdir Stiebe Junior (ogecrom)
Votes: 2
Every RDB$FIELDS.RDB$COMPUTED_SOURCE are null except for the ones from table computed fields.
Views with subqueries or expressions as fields should also have the correct computed source.
I've found this because I would like to pinpoint fields from views and try to execute statement the view source with only selected fields.
This is the sql query I was trying to build.
select
RF.RDB$FIELD_POSITION,
coalesce(trim(VR.RDB$CONTEXT_NAME) || '.' || trim(RF.RDB$BASE_FIELD), F.RDB$COMPUTED_SOURCE)
from
RDB$RELATION_FIELDS RF left join
RDB$VIEW_RELATIONS VR on RF.RDB$RELATION_NAME = VR.RDB$VIEW_NAME and RF.RDB$VIEW_CONTEXT = VR.RDB$VIEW_CONTEXT left join
RDB$FIELDS F on F.RDB$FIELD_NAME = RF.RDB$FIELD_SOURCE
where
RF.RDB$RELATION_NAME = 'VIEW_NAME'
order by
RF.RDB$FIELD_POSITION
The text was updated successfully, but these errors were encountered: