flâneur — a map of the web's best reading

PostgreSQL: Documentation: 17: 8.1. Numeric Types

postgresql.org · 2,600 words · saved by 1 readers

Numeric types consist of two-, four-, and eight-byte integers, four- and eight-byte floating-point numbers, and selectable-precision decimals. Table 8.2 lists the available types. Table 8.2. Numeric Types The syntax of constants for the numeric types is described in Section 4.1.2. The numeric types have a full set of corresponding arithmetic operators and functions. Refer to Chapter 9 for more information. The following sections describe the types in detail. The types smallint, integer, and bigint store whole numbers, that is, numbers without fractional components, of various ranges. Attempts to store values outside of the allowed range will result in an error. The type integer is the common choice, as it offers the best balance between range, storage size, and performance. The smallint type is generally only used if disk space is at a premium. The bigint type is designed to be used when the range of the integer type is insufficient. SQL only specifies the integer types integer (or int

PostgreSQL: Documentation: 18: 8.1. Numeric Types July 16, 2026: PostgreSQL 19 Beta 2 Released! Documentation → PostgreSQL 18 Supported Versions: Current ( 18 ) / 17 / 16 / 15 / 14 Development Versions: 19 / devel Unsupported versions: 13 / 12 / 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0 / 8.4 / 8.3 / 8.2 8.1. Numeric Types Prev Up Chapter 8. Data Types Home Next 8.1. Numeric Types # 8.1.1. Integer Types 8.1.2. Arbitrary Precision Numbers 8.1.3. Floating-Point Types 8.1.4. Serial Types Numeric types consist of two-, four-, and eight-byte integers, four- and eight-byte floating-poin

Explore this link on the map →

related reading