Integer Literals

An integer has no fractional part and cannot include a decimal point. Built-in data types of SQL that can be exactly represented as literal integers include BIGINT, BIGSERIAL, DECIMAL(p, 0), INT, INT8, SERIAL, SERIAL8, and SMALLINT.

If you use the representation of a number in a base other than 10 (such as a binary, octal, or hexadecimal) in any context where a literal integer is valid, the database server will attempt to interpret the value as a base-10 literal integer. For most data values, the result will be incorrect.

The following examples show some valid literal integers:
10             -27             +25567

Thousands separators (such as comma symbols) are not valid in literal integers, nor in any other literal number.