Consider following script:
=============
create domain dm_nil int;
create domain dm_not_null int not null;
create domain dm_nn_with_default int default 499 not null;
recreate table tbase(
id smallint -- generated always as identity primary key using index tbase_pk -- not null implicit
,fn_both_nn_dm_nn dm_not_null default 100 NOT NULL -- not null BOTH in field spec. and from domain
,fn_dm_nn dm_not_null default 200 -- not null from domain (implicit)
,fn_explicit_nn int default 300 NOT NULL -- not null explicit, type directly here (w/o domain)
,fn_dm_nil_explicit_nn dm_nil default 400 NOT NULL -- not null explicit, type from nullable domain
,fn_dm_nn_default_499 dm_nn_with_default -- not null from domain (implicit), default = 499
,fn_dm_nn_default_500 dm_nn_with_default default 500 -- not null from domain (implicit)
,fn_via_dm_nil dm_nil -- nullable implicit, type from domain
,fn_explicit_nil int -- nullable explicit, type directly here (w/o domain)
,id_quad computed by(id*id)
);
show table tbase;
=============
Its output will be:
=============
ID SMALLINT Nullable
FN_BOTH_NN_DM_NN (DM_NOT_NULL) INTEGER Not Null default 100
FN_DM_NN (DM_NOT_NULL) INTEGER Not Null default 200 -- not null from domain (implicit)
FN_EXPLICIT_NN INTEGER Not Null default 300
FN_DM_NIL_EXPLICIT_NN (DM_NIL) INTEGER Not Null default 400
FN_DM_NN_DEFAULT_499 (DM_NN_WITH_DEFAULT) INTEGER Not Null default 499
FN_DM_NN_DEFAULT_500 (DM_NN_WITH_DEFAULT) INTEGER Not Null default 500 -- not null from domain (implicit)
FN_VIA_DM_NIL (DM_NIL) INTEGER Nullable
FN_EXPLICIT_NIL INTEGER Nullable
ID_QUAD Computed by: (id*id)
=============
(checked on 3.x ... 6.x)
Is it expected that we can see comments for two columns here?