Subject Re: [ib-support] System tables: domain extraction
Author Frank Ingermann
Hi Cosmin,

Cosmin Popa wrote:
> Does someone know how to extract the domains from an IB/Firebird database ?
>
> if I issue this select
>
> "select rdb$field_name, rdb$field_length, rdb$field_precision, rdb$field_scale, rdb$field_type
> from rdb$fields
> where rdb$system_flag = 0"
>
> I obtain all the domains (including the auto-generated ones).
>
> The only difference between the two groups of them (those explicitly generated and those implicitly) is the prefix 'RDB$' in the rdb$field_name column, but this criteria is too ambiguous.
>
> Thanx.

try:

select rdb$field_name, rdb$field_length, rdb$field_precision, rdb$field_scale,
rdb$field_type
from rdb$fields
where rdb$system_flag = 0
and not rdb$field_name like "RDB$%"

(seems stupid, but works - and most tools do it like this, too...)

hth,
fingerman
--
-------------------------------------------------------------------------
when parsers parse, and compilers compile, then why don't objects object?

fingerbirdy - fingerman's door to Firebird
http://www.fingerbird.de