Subject Re: Schema query? Need help to get started.
Author Adam
Hi Thomas,

> My main problem is:
>
> * Lack of documentation. For a lof of the sutff I am pretty lost.

Borland open sourced Interbase and Firebird is based on that open
source build. I doubt Borland bothered to publish an exhaustive list
of every system table and field, so feel free to document anything you
find and contribute it. The documentation will come eventually, but at
the moment it is pretty high level.

> * Where the heck is a list of all TABLES? I can find fields, relations,
> but no RDB$ table that contains the TABLES themseves.

The RDB$ isn't simply a convenience for people such as yourself, you
will not find a hidden table called RDB$GET_THE_TABLE_NAMES.

In two minutes I wrote this

SELECT RDB$RELATION_NAME
FROM RDB$RELATIONS
WHERE RDB$RELATION_NAME NOT LIKE 'RDB$%'
AND RDB$RELATION_NAME NOT IN
(
SELECT RDB$VIEW_NAME
FROM RDB$VIEW_RELATIONS
)
ORDER BY RDB$RELATION_NAME

It wasn't rocket science (and there may be a better way to do it), I
simply noticed that the RDB$RELATIONS.RDB$RELATION_NAME was pretty
close, it just also included the views and the system tables.

Any way, that should give you a start.

Adam