Numeric
PostgreSQL Data Type Numeric
Integer
Type |
Size |
Min Value |
Max Value |
Description |
smallint |
2 bytes |
-32,768 |
+32,767 |
- |
integer |
4 bytes |
-2,147,483,648 |
+2,147,483,647 |
- |
bigint |
8 bytes |
-9,223,372,036,854,775,808 |
+9,223,372,036,854,775,807 |
- |
smallserial |
2 bytes |
1 |
+32,767 |
autoincrementing integer |
serial |
4 bytes |
1 |
+2,147,483,647 |
autoincrementing integer |
bigserial |
8 bytes |
1 |
+9,223,372,036,854,775,807 |
autoincrementing integer |
Float
Type |
Size |
Range |
decimal |
variable |
up to 131072 digits before the decimal point; up to 16383 digits after the decimal point |
numeric |
variable |
up to 131072 digits before the decimal point; up to 16383 digits after the decimal point |
real |
4 bytes |
6 decimal digits precision |
double precision |
8 bytes |
15 decimal digits precision |
smallserial |
8 bytes |
15 decimal digits precision |
Monetary
Type |
Size |
Min Value |
Max Value |
Description |
money |
8 bytes |
-9,223,372,036,854,775,808 |
+9,223,372,036,854,775,807 |
currency amount |
Reference