Subject Re: [firebird-support] Re: Money data type
Author Helen Borrie
At 05:30 AM 21/05/2006, you wrote:
>Could you please elaborate a bit more on the differences between
>decimal and numeric and why I would want to "exceed the precision".

Under the SQL standard, it's possible to differentiate between the
two types of scaled integer and have a type DECIMAL that stores a
number with higher precision (the first argument in the declaration)
than that specified.

In Firebird there is no difference. Both decimal and numeric will
accept values up to the supported implementation limit without

>What might the syntax look like to create the domain mentioned?

create domain money as numeric(18,2)

plus any constraints you want to add.

interested to see if anything on this topic has changed recently and
>what is currently recommended. Also, has Firebird 2.0 introduced
>anything new to consider on this topic?

No. The next "big thing" with fixed numeric types would likely be an
increase in possible precision if/when Firebird supports 128-bit
integers - not currently on the radar.

Another thing that might come "some time" would be the ability to
have domain definitions available as "data types" for the input and
output arguments and local variables for stored procedures and
EXECUTE BLOCK constructs. Currently it's not possible, so you have
to take care that these variables match any domain-driven database
values they have to accommodate. But it is on the radar.