Subject [ib-support] System Table Inconsistency?
Author andrewgarner@garnernet.co.uk
Am I missing something or is there an inconsistancy in the system
tables?

A field defined as say numeric(18) has a rdb$field_type value of 16
in rdb$fields. Should I therefore expect 16 to be included as a
value for field type in rdb$types?

Thanks, Andy.

ODS 10.0
Implementation 1.50.1
Level 1.6
Server Version WI-T0.9.4.41 Firebird Test 1

To re-produce:
==============

SET SQL DIALECT 3;
CREATE DATABASE 'c:\foo.gdb' USER 'SYSDBA' PASSWORD 'masterkey';
CREATE TABLE ATABLE (PK NUMERIC(18) NOT NULL, DATAFIELD1 NUMERIC(18),
DATAFIELD2 NUMERIC(5), PRIMARY KEY (PK) );

select
r.rdb$field_name r_field,
f.rdb$field_length f_len,
f.rdb$field_type f_type,
t.rdb$type t_type,
t.rdb$type_name t_type_name
from
rdb$relation_fields r left outer join
rdb$fields f on f.rdb$field_name = r.rdb$field_source
left outer join
rdb$types t on f.rdb$field_type = t.rdb$type and
t.rdb$field_name = 'RDB$FIELD_TYPE'
where
r.rdb$relation_name = 'ATABLE';

/*

r_field f_len f_type t_type t_type_name
--------- ----- ------ ------ -----------
PK 8 16 <null> <null>
DATAFIELD1 8 16 <null> <null>
DATAFIELD2 4 8 8 LONG

*/