|Subject||Re: [Firebird-Architect] Domains and NOT NULL in PSQL|
> > I'm not sure i understand your point, but the result ofa
> > CAST(<value> AS <domain>) should meet the domain constraints.
> Can you think of a case when a constraint could be violated as a result of
> cast operation? I.e. when CAST (<value> as <domain>) could be differentthan
> CAST (<value> as TYPE OF <domain>)?<value> = 4 (for some no apparent reason, eg: input from user)
CAST(4 as D_BOOLEAN)
where D_BOOLEAN is of type SMALLINT and has
CHECK(value in (0, 1) or value is null)
4 is a valid SMALLINT, but not a valid D_BOOLEAN
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Database development questions? Check the forum!