Subject Re: Several questions about Firebird ODS
Author vklimov45
It seems I found answers on some quiestion (if anyone else interested):

--- In firebird-support@yahoogroups.com, "vklimov45" <vklimov45@...> wrote:
> 1. dtype_varying defined in fields.h with length, including 2 bytes with length? From tests it seems exact data length 253 if there defined 255.

Yes, confirmed by some Firebird documents.

> 2. I got relations defs from relations.h for RDB$RELATIONS, but it fails to extract properly from ODS 11 table (it seems there additional 4 bytes something somewhere after first 3 blobs), but there is no ods11 defs (or at least I was unable to find, if exists - where?) in sources. Is there really additional field (where to search) or something different in ODS 11 with extraction?
> 3. Some tables (at least 1) in ods 10 DB have no nullbits mask, and another have this mask shifted at some point (first several fields have proper relation to mask and near and mask bits related to fields as [f_no - 1]). Isn't size of this mask exactly 4 bytes per every 32 fields? If not - is it somewhere stored?

Null mask is 4 bytes per every 32 or less fields. Just some fields occupied empty spaces (probably deleted fields). ODS 11 blobs it seems aligned by 8 bytes (anything else?) even if remains 4 bytes aligned in jrd/align.h for Firebird 3.0 snapshot. At least it works with such alignment.

> 4. I can't find in sources how to understand relation 8 (RDB$FORMATS) blobs by RDB$DESCRIPTOR data. How to decode those bytes? Is it related to some file in sources? Is this structure where rhd_format related?

Still have no idea what is it and how to use it, but I was able to avoid it for now.

Made simple tool to view database structure (tested with several Firebird db ODS v. 10 - 11 (Firebird 1.5 - 2.5)), if someone would like to use it - uploaded to http://wintarif.narod.ru/Download/Products/FbViewer.zip (picture at http://wintarif.narod.ru/products.htm but codepage win-1251).