>On 1/11/08, André Knappstein, Controlling <[EMAIL PROTECTED]> wrote:
>> Once you remove the "NOT NULL" from the domain, this column would
>> still remain "not nullable".

You cannot remove the NOT NULL constraint.

At 09:33 PM 11/01/2008, Jiri wrote:


>OK, now I see. I missed, that the column will be evaluated only for
>column definition without domain.

Incorrect.  All column definitions have a domain, including those that are 
defined independently of a user-defined domain.  All of the domain definitions 
are stored in RDB$FIELDS.  The column RDB$FIELD_SOURCE in RDB$RELATION_FIELDS 
points to the name of the domain in RDB$FIELDS, viz., RDB$FIELD_NAME.  The 
nullability check is performed on the record that stores the domain definition, 
i.e. RDB$FIELDS.RDB$NULL_FLAG. 


>PS: I haven't looked to the reported problem yet, so I'm little
>confused, 'cause seems, that the thread has splited into two (about
>the wrong results of code and about the not null on column (without
>domain).
>If there's a problem, I'll try to fix it asap. If there's another
>problem (not related to DNET-151), please kick me. :)

Just make sure you understand 
a) the difference between NULL and nullable
b) that "nullable" means the field is allowed to be null:  it does not mean 
that it is always null;  while "non-nullable" will always mean that the field 
has been constrained to be NOT NULL
c) that the VALUE of 1 on RDB$FIELDS.RDB$NULL_FLAG means that the field is NOT 
nullable and that the nullABLE flag does not have the value 0:  it is null.
d) that there will be more potential for confusion in the code, in case the 
GetSchema call is reading the null indicator field (sqlind) directly from the 
output descriptor:  after the query on the system tables has been prepared, 
sqlind will be -1 if the field is nullable, or 0 if it is non-nullable.

For anyone who doesn't get what null is (and is not), please go to the 
Documentation Index at the Firebird website and read the Null Guide.

Helen


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to