Re: int8 version of NUMERIC? - Mailing list pgsql-general

From Arjen van der Meijden
Subject Re: int8 version of NUMERIC?
Date
Msg-id 3FFDC495.1010504@vulcanus.its.tudelft.nl
Whole thread Raw
In response to int8 version of NUMERIC?  (David Garamond <lists@zara.6.isreserved.com>)
Responses Re: int8 version of NUMERIC?
List pgsql-general
David Garamond wrote:

> In Interbase and Firebird, NUMERIC is implemented as 64-bit integer.
> This limits the range to NUMERIC(18, *) but for many uses that's
> adequate. And moreover it's fast and efficient.
>
> Is there a way in PostgreSQL to do something similar, i.e. I want to:
>
> - use 64-bit ints, not string bits or arbitrary precision which is
> dubbed as "much slower than ints" in the documentation;
They call that a 'bigint', which is in SQL-spec and I noticed it got
inserted in firebird 1.5

> - use decimals, like NUMERIC(18,4);
Well, decimal and numeric are both available in postgres

> - store and retrieve decimal numbers pretty much transparently (e.g. I
> don't want to remember to insert 123456 for 12.3456 and playing with
> multiplying/dividing by 10000);
You can just use 12.3456 in postgres.

Best regards,

Arjen



pgsql-general by date:

Previous
From: "Hought, Todd"
Date:
Subject: beginner query help
Next
From: Steve Crawford
Date:
Subject: Re: 7.3.3 drop table takes very long time