Re: Fixed-point scalars? - Mailing list pgsql-general

From Michael Glaesemann
Subject Re: Fixed-point scalars?
Date
Msg-id 9F5EB427-DCCF-4C52-9E65-E44882CEA979@seespotcode.net
Whole thread Raw
In response to Fixed-point scalars?  (Ron Johnson <ron.l.johnson@cox.net>)
Responses Re: Fixed-point scalars?  (Ron Johnson <ron.l.johnson@cox.net>)
List pgsql-general
On Oct 18, 2006, at 9:46 AM, Ron Johnson wrote:

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

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


http://www.postgresql.org/docs/current/interactive/
datatype.html#DATATYPE-NUMERIC

The docs list 2 byte, 4 byte, and 8 byte integer types.


> 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?

Later on, same page:

http://www.postgresql.org/docs/current/interactive/
datatype.html#DATATYPE-NUMERIC-DECIMAL

> The actual storage requirement is two bytes for each group of four
> decimal digits, plus eight bytes overhead.

<snip />

> The types decimal and numeric are equivalent. Both types are part
> of the SQL standard.

The PostgreSQL are quite extensive and helpful.

Michael Glaesemann
grzm seespotcode net



pgsql-general by date:

Previous
From: roopa perumalraja
Date:
Subject: Maximum size of database
Next
From: Michael Fuhr
Date:
Subject: Re: Maximum size of database