Table 8-2. Numeric Types
Name Range
smallint -32768 to +32767
integer -2147483648 to +2147483647
bigint -9223372036854775808 to 9223372036854775807
However,
# SELECT -32768::SMALLINT;
ERROR: smallint out of range
# SELECT -2147483648::INTEGER;
ERROR: integer out of range
# SELECT -9223372036854775808::BIGINT;
ERROR: bigint out of range
# SELECT version();
PostgreSQL 8.0.2 on i386-pc-linux-gnu, compiled by GCC cc (GCC) 3.3.5
(Debian 1:3.3.5-5)
7.4.6 also produces errors, albeit the message is
invariably `integer out of range' in all three cases.
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly