Re: type "serial" and biginteger

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: type "serial" and biginteger
Дата
Msg-id CAHyXU0xdigiVewFri9HaMk12xBZby+p+hA8iXt6NnfKf+E6OJQ@mail.gmail.com
обсуждение исходный текст
Ответ на type "serial" and biginteger  (DFE <mimmopasticcio@gmail.com>)
Список pgsql-novice
On Tue, Sep 27, 2011 at 5:16 AM, DFE <mimmopasticcio@gmail.com> wrote:
> Hi all,
> I create a table with Primary Key with name "gid" and type SERIAL.
> I have a dubt on the SERIAL type: this data type is a INTEGER (int4)
> type, but the sequence that is automatically created with pgAdmin has
> BIGINTEGER output (MAXVALUE 9223372036854775807).
> This fact can cause a numeric overflow during the insert?

yup -- if you're really worried about this, use BIGSERIAL.  you could
in theory cap the sequence, but you'd just be trading one error for
another.

merlin

В списке pgsql-novice по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: plperl.so no such file or directory
Следующее
От: Nomeneta Saili
Дата:
Сообщение: PostgreSQL ANSI OBDC Installation