Subject System tables in Firebird 3
Author Stefan Sinne
Hello.

After backing up a Firebird 2.5 database and restoring it in 3.0.3, the default source for the input parameters of procedures is
stored in RDB$FIELDS.RDB$DEFAULT_SOURCE.

Then, when I recompile a procedure with such an input parameter, the default value store changes to
RDB$PROCEDURE_PARAMETERS.RDB$DEFAULT_SOURCE.

What would be the right way to read the parameter information in Firebird 3?

Would the following be ok?

select coalesce(a.rdb$null_flag, b.rdb$null_flag),
coalesce(a.rdb$default_source, b.rdb$default_source),
coalesce(a.rdb$collation_id, b.rdb$collation_id)
from rdb$procedure_parameters a
join rdb$fields b on a.rdb$field_source = b.rdb$field_name
where a.rdb$procedure_name = 'myproc'

Regards, Stefan