Numeric Data Types

Numeric data types store a variety of number-related data. The 7.X series of releases has brought some changes to this area. Namely, PostgreSQL now uses a more descriptive naming convention for number-related data types (for example, BIGINT versus INT8).

Recently, some data types have become deprecated over the last few releases. For instance, use of the MONEY data type is no longer encouraged; instead, it is preferential to use the DECIMAL data type.

BIGINT (or INT8)

Description

Holds a very large integer.

Inputs

Large integer (approximately 1 × 10^18)

Storage Size

8 bytes

Notes

Versions of PostgreSQL before 7.1 might refer to this data type as INT8.

DECIMAL (or NUMERIC)

Description

Holds a number of user-defined length ...

Get PostgreSQL Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.