Subject Re: [Firebird-Architect] Domains and NOT NULL in PSQL
Author Martijn Tonies
> > I'm not sure i understand your point, but the result of
> > 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 different
> CAST (<value> as TYPE OF <domain>)?

<value> = 4 (for some no apparent reason, eg: input from user)


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

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
My thoughts:
Database development questions? Check the forum!