Subject Re: [firebird-support] FB 2.1.2.18118 bug in system table?
Author Martijn Tonies
Hi,

> I defined the domain of the NOT NULL condition:
>
> CREATE DOMAIN AS D_PRIMARY_KEY
> INTEGER NOT NULL;
>
> I'm using it on the table in this way:
>
> CREATE TABLE ZDARZENIA_GOSPODARCZE (
> ID_ZDARZENIA D_PRIMARY_KEY,
> ....
>
> However, the system table RDB$RELATION_FIELDS in the column
> RDB$NULL_FLAG this item is NULL, not 1!
>
> If the declaration will add NOT NULL:
>
> CREATE TABLE ZDARZENIA_GOSPODARCZE (
> ID_ZDARZENIA D_PRIMARY_KEY NOT NULL,
> ...
>
> then the column RDB$NULL_FLAG has a valid value (1).
>
> Does the definition of a domain should not include NOT NULL?
> Is this a mistake?

RDB$NULL_FLAG in RELATION_FIELDS means that the
NOT NULL is defined in the Table DDL, this record has an
entry RDB$FIELD_SOURCE pointing to RDB$FIELDS where
the Domain definition has another RDB$NULL_FLAG.

With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!

Database questions? Check the forum:
http://www.databasedevelopmentforum.com