Subject Re: [firebird-support] System Domain Cleanup
Author Ann W. Harrison
Nando Dessena wrote:
>
> to ask for only domains that are in use.
>
> how do you ask for that? Do you just join RDB$FIELDS with the other
> relevant system tables?
>

Yes - RDB$RELATION_FIELDS and RDB$PROCEDURE_PARAMETERS.

Something like this should get rid of unused entries in RDB$FIELDS


delete from rdb$fields where
rdb$field_name not in
(select rdb$field_source from rdb$relation_fields)
and rdb$field_name not in
(select rdb$field_source from rdb$procedure_parameters)


Regards,


Ann