Subject | Re: [firebird-support] RDB$NULL_FLAG |
---|---|
Author | Ivan Prenosil |
Post date | 2004-09-03T16:45:21Z |
(You are talking about rdb$relation_fields and rdb$FIELDS, aren't you?)
It is simple:
This will set null_flag in rdb$fields:
CREATE DOMAIN D INTEGER NOT NULL;
While this will set null_flag in rdb$relation_fields:
CREATE TABLE T ( I D NOT NULL);
You can have general domain, that is further restricet at table level, like
CREATE DOMAIN D_BOOL INTEGER;
CREATE TABLE TAB (
A D_BOOL NOT NULL,
B D_BOOL
);
Ivan
It is simple:
This will set null_flag in rdb$fields:
CREATE DOMAIN D INTEGER NOT NULL;
While this will set null_flag in rdb$relation_fields:
CREATE TABLE T ( I D NOT NULL);
You can have general domain, that is further restricet at table level, like
CREATE DOMAIN D_BOOL INTEGER;
CREATE TABLE TAB (
A D_BOOL NOT NULL,
B D_BOOL
);
Ivan
----- Original Message -----
From: "Milan Babuskov" <milanb@...>
To: <firebird-support@yahoogroups.com>
Sent: Friday, September 03, 2004 6:10 PM
Subject: [firebird-support] RDB$NULL_FLAG
> Hello,
>
> While browsing through system tables, I found out that the field
> RDB$NULL_FLAG is found both in RDB$TYPES and RDB$RELATION_FIELDS. I
> understand that rdb$types contain domain data and rdb$relation_fields
> contain column data. What I don't understand is why is null_flag needed
> in rdb$relation_fields (every column has a domain, and it information
> can be pulled from there)?
>
> I'd also like to know what are the implications if the value of
> null_flag is different in rdb$types and rdb$relation_fields?
>
> Third, I'd like to know what is the proper way of changing a column from
> not null to null? Do I just change null_flag in rdb$relation_fields?
>
> I'm not sure if this is the right place to ask, so I'll ask at devel
> list if I don't get any answers here.
>
> TIA
>
> --
> Milan Babuskov
> http://fbexport.sourceforge.net
> http://www.flamerobin.org