Re: BUG #8718: serial datatype creates a sequence with bigserial limits

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: BUG #8718: serial datatype creates a sequence with bigserial limits
Дата
Msg-id 1388784349415-5785272.post@n5.nabble.com
обсуждение исходный текст
Ответ на BUG #8718: serial datatype creates a sequence with bigserial limits  (richcocoa@gmail.com)
Список 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 по дате отправления:

Предыдущее
От: jodynickel@gmail.com
Дата:
Сообщение: BUG #8721: pg_wrapper unaware of configuration includes
Следующее
От: David Johnston
Дата:
Сообщение: Re: BUG #8721: pg_wrapper unaware of configuration includes