Subject | Re: [Firebird-Architect] NUMERIC vs DECIMAL |
---|---|
Author | Martijn Tonies |
Post date | 2003-08-07T07:41Z |
> > > - Both numeric and decimal behave the same. Numeric isn't SQLcompliant
> > > currently.NUMERIC(<=4,x), not for DECIMAL:
> > >
> > > - For both dialects, being "p" the precision, the internal storage is:
> > > 1 <= p <= 4 => smallint
> >
> > Are you sure ? I'd swear that decimal is stored as INTEGER (32bit) as
> > documented. I checked that some time ago on FB 1.0.2 (? don't remember,
> > but I'd also swear this apply to both dialects). But my memory is often
> > lousy, so the reality check is needed.
>
> Pavel is right. Simple test reveals that SHORT is used only for
>Needless to say this stuff is all very sucky for tool developers
> CREATE TABLE T(
> D4 DECIMAL(4,1),
> N4 NUMERIC(4,2),
(isql included) and extract metadata... pff... Luckily, ODS10
brings RDB$SCALE ... that helps. A bit.
With regards,
Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com