Subject Re: [ib-support] NOT NULL constraints and the System Tables
Author Martijn Tonies
Hi,

dropping the constraint touches the RDB$NULL_FLAG column alright. It sets it to 0.

Good. Now, when I try to insert a NULL, it fails - even after committing.

However, when I re-connect, everything is fine. It seems that upon connection (or so - can someone shed a light here?) this kind of meta-data is cached?

Next question: to do the reverse, is setting the RDB$NULL_FLAG to 1 enough to disallow NULLs? Do I have to create records in the RDB$CHECK_CONSTRAINTS and RDB$RELATION_CONSTRAINTS tables to be on the safe side? If so, how do I generate the constraint name?


Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com

Upscene Productions
http://www.upscene.com

"This is an object-oriented system.
If we change anything, the users object."



The null flag in rdb$relation_fields and rdb$fields predated
sql and constraints. It can be used alone to disallow nulls.
To allow nulls, you must remove both the constraint and the
null flag.



Regards,

Ann
www.ibphoenix.com
We have answers.


Yahoo! Groups Sponsor



To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



[Non-text portions of this message have been removed]