Subject RE: [firebird-support] Metadata about views
Author Svein Erling Tysvær
>Maybe, I've completly mistaken the original question, but isn't
>
>select
> r.RDB$VIEW_SOURCE
>from RDB$RELATIONS r
>where r.RDB$VIEW_SOURCE is not null
>
>simply returning the underlying query - with every field?

Sure, it would in many cases return the query used in the view (I think it is possible to delete the RDB$VIEW_SOURCE and still have a working view, though that is rarely desirable and probably not something Łukasz has to worry about), but it doesn't return FieldNames as defined in

CREATE VIEW [ViewName]([FieldNames]) AS ...

just whatever is after AS.

Set