Re: BUG #8718: serial datatype creates a sequence with bigserial limits - Mailing list pgsql-bugs

From David Johnston
Subject Re: BUG #8718: serial datatype creates a sequence with bigserial limits
Date
Msg-id 1388784349415-5785272.post@n5.nabble.com
Whole thread Raw
In response to BUG #8718: serial datatype creates a sequence with bigserial limits  (richcocoa@gmail.com)
List pgsql-bugs
richcocoa wrote
> The following bug has been logged on the website:
>
> Bug reference:      8718
> Logged by:          Richard Savio
> Email address:

> richcocoa@

> PostgreSQL version: 9.3.2
> Operating system:   Arch Linux 3.12.16 Linux kernel
> Description:
>
> If you create a column with serial data type, it is created as an INTEGER
> field but the sequence used to auto-increment the field has a limit only
> suitable for BIGINT, so it may result in out of range errors.

Yes, it does.  This is by design.  You can either get a "sequence out of
range" error or an "integer overflow error" if you run against the limit.
At least this way you can alter the type to be a bigint without having to
worry about messing with the sequence.

David J.




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/BUG-8718-serial-datatype-creates-a-sequence-with-bigserial-limits-tp5785224p5785272.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

pgsql-bugs by date:

Previous
From: jodynickel@gmail.com
Date:
Subject: BUG #8721: pg_wrapper unaware of configuration includes
Next
From: David Johnston
Date:
Subject: Re: BUG #8721: pg_wrapper unaware of configuration includes