Numeric Type Serial Range

Started by Lewis Christieover 10 years ago2 messagesdocs
Jump to latest
#1Lewis Christie
lewis.christie@gmail.com

Hi,

I believe the range listed in Table 8-2. Numeric Types
http://www.postgresql.org/docs/9.3/static/datatype-numeric.html is
incorrect for the serial types.

E.g.
serial4 bytesautoincrementing integer1 to 2147483647This describes the
auto-incrementing behaviour, but in practice the range is -2147483648 to
+2147483647 as the only restriction on the created column is NOT NULL.

Tested on 9.3.10.

Regards,
Lewis Christie

#2Michael Paquier
michael@paquier.xyz
In reply to: Lewis Christie (#1)
Re: Numeric Type Serial Range

On Tue, Nov 3, 2015 at 12:28 PM, Lewis Christie <lewis.christie@gmail.com>
wrote:

I believe the range listed in Table 8-2. Numeric Types
http://www.postgresql.org/docs/9.3/static/datatype-numeric.html is
incorrect for the serial types.

E.g.
serial4 bytesautoincrementing integer1 to 2147483647This describes the
auto-incrementing behaviour, but in practice the range is -2147483648 to
+2147483647 as the only restriction on the created column is NOT NULL.

I would believe that this refers to the default range of a serial column,
which begins at 1 once the table using it is declared.
--
Michael