Fixed-point scalars? - Mailing list pgsql-general

From Ron Johnson
Subject Fixed-point scalars?
Date
Msg-id 45357974.7050703@cox.net
Whole thread Raw
Responses Re: Fixed-point scalars?  (Michael Glaesemann <grzm@seespotcode.net>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

PG 8.1.5

The closed-source RDBMS that we are hoping to archive on PostgreSQL
8.1.5 has fixed-point scalars, where the data is *stored* as a plain
old scalar, but is run-time *interpreted* as having a decimal point.
 For example:

  SMALLINT(2)
  INTEGER(2)
  BIGINT(2)

We use INTEGER(2) *extensively* for monetary values that won't
exceed $21,474,836.47, and BIGINT(2) for those times where it might.

This is very useful since integer arithmetic is so fast, and you
know the field will always be 4 bytes.

Are these data-types not in PG, or am I missing something?

Also, how do you calculate the size of a NUMERIC?

Lastly, I know they are the same, but which is the
"preferred/standard" type: NUMERIC or DECIMAL?

Thanks
- --
Ron Johnson, Jr.
Jefferson LA  USA

Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFNXl0S9HxQb37XmcRAsoiAJ0f8UGrYRm8eE3eX6EJYDJn6riV1wCfScHC
J7l8E1S7WS++1wDxW/9k6b0=
=zhgS
-----END PGP SIGNATURE-----

pgsql-general by date:

Previous
From: Ragnar
Date:
Subject: Re: Strange behavior on non-existent field in subselect?
Next
From: Ron Peterson
Date:
Subject: Re: uuid c function contrib