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



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org/

Reply via email to