Subject Re: RES: [] [Firebird-Java] Absolutely boring...
Author Helen Borrie
At 01:59 PM 24/05/2004 +0000, you wrote:
>Helen,
>
> > The check constraint is out of range - that is why you are getting the
> > overflow error. The maximum precision of NUMERIC is 18; with a scale
> > of 5, your numbers resolve to a precision of 19. Additionally, you
> > declared your number with a precision of 16, not 18 (although Firebird
> > stores it as 18, your check isn't valid for a numeric(16)).
> >
> > Change your check to
> >
> > CHECK (VALUE BETWEEN -99999999999.99999 AND +99999999999.99999)
>
>Why did Firebird allow to create a constraint, that cannot be used
>later? I think it makes sense to add it to the bug tracker, doesn't it?

Yes, it probably does. You could use Francisco's example as a test case.
I've seen this kind of anomaly before (in IB) - where the DDL parser lets
an invalid check go through but it blows up when the check is actually
performed. The DDL parser won't pass a type mismatch but it seems a bit
sloppy about numeric range checking.

Helen